vcl/source/treelist/svimpbox.cxx |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 280e28c0e53d28c512736c8051c7e56ba0c4f46b
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Mar 14 11:18:36 2023 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Mar 16 11:15:48 2023 +0000

    Resolves: tdf#154169 tree lines not visible in macOS dark mode
    
    or kf5, a collision in expectations between
    
    commit db6fbb0317fcb0a7babca9f71adbbb7c126b9e4e
    Date:   Tue Feb 14 08:56:13 2023 +0000
    
        base section Titles are invisible in dark mode
    
    and
    
    commit 5f9cd841a22fa7eb6f29ca8b9a35a8b016fb3d56
    Date:   Thu Oct 13 22:03:27 2022 +0200
    
        tdf#144587 Fix lines in treelists using dark mode
    
        As reported by the user, the lines in a treelist are dark over a dark 
background. This patch fixes that.
    
    where db6fbb0317fcb0a7babca9f71adbbb7c126b9e4e basically undid the
    work of 5f9cd841a22fa7eb6f29ca8b9a35a8b016fb3d56 making the tree
    lines indistinct again when making the base heading distinct
    
    I think "LightColor" and "ShadowColor" etc should be thought of from the
    perspective of the expectations of the original "Light Mode" and
    "LightColor" is basically close to the window/canvas background and
    "ShadowColor" basically close to the the text foreground color, so
    "LightColor" is something close to Black in "Dark Mode" and not
    typically suitable for drawing on the default background, while
    "ShadowColor" is something close to White in "Dark Mode" and suitable
    for use on the default background.
    
    also drop restoring the line color with
    rRenderContext.SetLineColor(aOldLineColor);
    because the Push(...LINECOLOR), Pop() does that automatically
    
    Change-Id: Ic08a8563f41f892c75a08195c04cd9b9c2abf4da
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148860
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index 32f3d234166f..c61fec0f001a 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -1023,12 +1023,7 @@ void SvImpLBox::DrawNet(vcl::RenderContext& 
rRenderContext)
     const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
 
     // Set color to draw the vertical and horizontal lines
-    Color aOldLineColor = rRenderContext.GetLineColor();
-    Color aBackgroundColor = rRenderContext.GetBackground().GetColor();
-    if (aBackgroundColor.IsDark())
-        rRenderContext.SetLineColor(rStyleSettings.GetLightColor());
-    else
-        rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
+    rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
 
     Point aPos1, aPos2;
     sal_uInt16 nDistance;
@@ -1069,7 +1064,6 @@ void SvImpLBox::DrawNet(vcl::RenderContext& 
rRenderContext)
         pEntry = m_pView->NextVisible(pEntry);
     }
 
-    rRenderContext.SetLineColor(aOldLineColor);
     rRenderContext.Pop();
 }
 

Reply via email to