include/tools/color.hxx            |    4 ++--
 sd/qa/unit/data/xml/tdf92001_0.xml |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ddb483509113e469b771320fea52f1b089574021
Author:     Heiko Tietze <heiko.tie...@documentfoundation.org>
AuthorDate: Wed Jul 12 12:52:39 2023 +0200
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Sat Jul 15 08:33:55 2023 +0200

    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.wegh...@posteo.de>
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

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"/>

Reply via email to