diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-03-14 11:18:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-03-15 19:49:50 +0000 |
commit | edf9d231dd5dc197aeb627bb0712dbc0db37f42e (patch) | |
tree | 15b8f627eecb28bc44f05b30da735e7c6e3bc6da | |
parent | 797938b7bb897617a078fc7e57de27759a00ed07 (diff) |
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/+/148848
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/source/treelist/svimpbox.cxx | 8 |
1 files changed, 1 insertions, 7 deletions
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(); } |