summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Tietze <heiko.tietze@documentfoundation.org>2023-07-12 12:52:39 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2023-07-15 08:33:55 +0200
commitddb483509113e469b771320fea52f1b089574021 (patch)
treefea1e840da8295bde9eeb7d1b58817a41cbad08e
parent693411e60c6bbd1c2ef25490cc3902f6b2461682 (diff)
Resolves tdf#156182 - Automatic text color unreadable with darker cells
Change-Id: Ia5e405fc05613726b5011174c8d00ca204eb31b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154352 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rw-r--r--include/tools/color.hxx4
-rw-r--r--sd/qa/unit/data/xml/tdf92001_0.xml2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index 296d6064c40a..41826ec2335f 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -311,8 +311,8 @@ public:
*/
bool IsDark() const
{
- // 62 is the number that means it also triggers on Ubuntu in dark mode
- return GetLuminance() <= 62;
+ // tdf#156182
+ return GetLuminance() <= 156;
}
/** Comparison with luminance thresholds.
diff --git a/sd/qa/unit/data/xml/tdf92001_0.xml b/sd/qa/unit/data/xml/tdf92001_0.xml
index d67952eb1fe5..234f751a9c23 100644
--- a/sd/qa/unit/data/xml/tdf92001_0.xml
+++ b/sd/qa/unit/data/xml/tdf92001_0.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<XShapes>
- <XShape positionX="4826" positionY="4826" sizeX="19557" sizeY="12953" type="com.sun.star.drawing.CustomShape" fontHeight="18.000000" fontColor="000000" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="CENTER" textLeftDistance="325" textRightDistance="325" textUpperDistance="200" textLowerDistance="200" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
+ <XShape positionX="4826" positionY="4826" sizeX="19557" sizeY="12953" type="com.sun.star.drawing.CustomShape" fontHeight="18.000000" fontColor="ffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="CENTER" textLeftDistance="325" textRightDistance="325" textUpperDistance="200" textLowerDistance="200" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="729fcf" fillTransparence="0" fillTransparenceGradientName="">
<FillTransparenceGradient style="LINEAR" startColor="000000" endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillGradient style="LINEAR" startColor="3465a4" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/>
<FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>