summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2023-10-16 11:34:56 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2023-10-16 15:35:10 +0200
commitf07d47fff571c4446988715f3c21362b9eed4265 (patch)
tree3c1fd3cb3fdd39f857a429e506f75d34bdd776d8 /include
parentf5a2192effbf52b2e64e4a40f325b1b42285833c (diff)
Related tdf#156182 - Keep legacy contrast for default background
Band aid for follow-up issues, eg. tdf#157706, tdf#157706... Change-Id: I1ca8cfe539a662100f6c581fd633ab1ebd5c6bfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158024 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/tools/color.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index c3bbb5bf0e2b..8ab35445893f 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -311,8 +311,11 @@ public:
*/
bool IsDark() const
{
- // tdf#156182
- return GetLuminance() <= 156;
+ // tdf#156182, and band aid for follow-up issues
+ if (mValue == 0x729fcf) // COL_DEFAULT_SHAPE_FILLING
+ return GetLuminance() <= 62;
+ else
+ return GetLuminance() <= 156;
}
/** Comparison with luminance thresholds.