cui/source/dialogs/cuicharmap.cxx   |    4 ++++
 sfx2/source/control/charwin.cxx     |    2 ++
 svx/source/dialog/charmap.cxx       |   16 +++++++++-------
 svx/source/dialog/searchcharmap.cxx |   16 +++++++++-------
 4 files changed, 24 insertions(+), 14 deletions(-)

New commits:
commit 19b650dd49620f699b695fb95679284be509ef2e
Author:     Rafael Lima <rafael.palma.l...@gmail.com>
AuthorDate: Fri Sep 30 19:05:10 2022 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Wed Oct 5 06:54:53 2022 +0200

    tdf#151232 Fix lines in Special Characters dialog in dark mode
    
    This patch makes the lines in the Special Characters dialog visible in dark 
mode. The Insert Symbols widget is also fixed with this patch.
    
    Tested in gen, gtk3 and kf5.
    
    Change-Id: Id1ee21557f2a0ea4ad8b60973d3de71e4d6d5d09
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140759
    Tested-by: Jenkins
    Reviewed-by: V, Stuart Foote <vstuart.fo...@utsa.edu>
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    (cherry picked from commit be8a83767bed2a9107c5407ebb9fbc0d44772075)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140957

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 7effeb4462cf..684186e25a6b 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -1163,10 +1163,12 @@ void SvxShowText::Paint(vcl::RenderContext& 
rRenderContext, const tools::Rectang
 
     Color aTextCol = rRenderContext.GetTextColor();
     Color aFillCol = rRenderContext.GetFillColor();
+    Color aLineCol = rRenderContext.GetFillColor();
 
     const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
     const Color aWindowTextColor(rStyleSettings.GetDialogTextColor());
     const Color aWindowColor(rStyleSettings.GetWindowColor());
+    const Color aShadowColor(rStyleSettings.GetShadowColor());
     rRenderContext.SetTextColor(aWindowTextColor);
     rRenderContext.SetFillColor(aWindowColor);
 
@@ -1237,10 +1239,12 @@ void SvxShowText::Paint(vcl::RenderContext& 
rRenderContext, const tools::Rectang
         }
     }
 
+    rRenderContext.SetLineColor(aShadowColor);
     rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), aSize));
     rRenderContext.DrawText(aPoint, aText);
     rRenderContext.SetTextColor(aTextCol);
     rRenderContext.SetFillColor(aFillCol);
+    rRenderContext.SetLineColor(aLineCol);
     if (bShrankFont)
         rRenderContext.SetFont(aOrigFont);
 }
diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index 6b7c8cd8b514..567f365e6b32 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -135,6 +135,7 @@ void SvxCharView::Paint(vcl::RenderContext& rRenderContext, 
const tools::Rectang
     Color aHighlightTextColor(rStyleSettings.GetHighlightTextColor());
     Color aFillColor(rStyleSettings.GetWindowColor());
     Color aTextColor(rStyleSettings.GetWindowTextColor());
+    Color aShadowColor(rStyleSettings.GetShadowColor());
 
     const OUString aText = GetText();
 
@@ -201,6 +202,7 @@ void SvxCharView::Paint(vcl::RenderContext& rRenderContext, 
const tools::Rectang
     else
     {
         rRenderContext.SetFillColor(aFillColor);
+        rRenderContext.SetLineColor(aShadowColor);
         rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), aSize));
 
         rRenderContext.SetTextColor(aWindowTextColor);
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 6eb9745c8233..4d8dd07b5031 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -509,7 +509,16 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& 
rRenderContext, int n1,
 
     Size aOutputSize(GetOutputSizePixel());
 
+    const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+    const Color aWindowTextColor(rStyleSettings.GetFieldTextColor());
+    Color aHighlightColor(rStyleSettings.GetHighlightColor());
+    Color aHighlightTextColor(rStyleSettings.GetHighlightTextColor());
+    Color aFaceColor(rStyleSettings.GetFaceColor());
+    Color aLightColor(rStyleSettings.GetLightColor());
+    Color aShadowColor(rStyleSettings.GetShadowColor());
+
     int i;
+    rRenderContext.SetLineColor(aShadowColor);
     for (i = 1; i < COLUMN_COUNT; ++i)
     {
         rRenderContext.DrawLine(Point(nX * i + m_nXGap, 0),
@@ -520,13 +529,6 @@ void SvxShowCharSet::DrawChars_Impl(vcl::RenderContext& 
rRenderContext, int n1,
         rRenderContext.DrawLine(Point(0, nY * i + m_nYGap),
                                 Point(aOutputSize.Width(), nY * i + m_nYGap));
     }
-    const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
-    const Color aWindowTextColor(rStyleSettings.GetFieldTextColor());
-    Color aHighlightColor(rStyleSettings.GetHighlightColor());
-    Color aHighlightTextColor(rStyleSettings.GetHighlightTextColor());
-    Color aFaceColor(rStyleSettings.GetFaceColor());
-    Color aLightColor(rStyleSettings.GetLightColor());
-    Color aShadowColor(rStyleSettings.GetShadowColor());
 
     int nTextHeight = rRenderContext.GetTextHeight();
     tools::Rectangle aBoundRect;
diff --git a/svx/source/dialog/searchcharmap.cxx 
b/svx/source/dialog/searchcharmap.cxx
index 201e018d5652..034ebd317a5a 100644
--- a/svx/source/dialog/searchcharmap.cxx
+++ b/svx/source/dialog/searchcharmap.cxx
@@ -157,7 +157,16 @@ void SvxSearchCharSet::DrawChars_Impl(vcl::RenderContext& 
rRenderContext, int n1
 
     Size aOutputSize(GetOutputSizePixel());
 
+    const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
+    const Color aWindowTextColor(rStyleSettings.GetFieldTextColor());
+    Color aHighlightColor(rStyleSettings.GetHighlightColor());
+    Color aHighlightTextColor(rStyleSettings.GetHighlightTextColor());
+    Color aFaceColor(rStyleSettings.GetFaceColor());
+    Color aLightColor(rStyleSettings.GetLightColor());
+    Color aShadowColor(rStyleSettings.GetShadowColor());
+
     int i;
+    rRenderContext.SetLineColor(aShadowColor);
     for (i = 1; i < COLUMN_COUNT; ++i)
     {
         rRenderContext.DrawLine(Point(nX * i + m_nXGap, 0),
@@ -168,13 +177,6 @@ void SvxSearchCharSet::DrawChars_Impl(vcl::RenderContext& 
rRenderContext, int n1
         rRenderContext.DrawLine(Point(0, nY * i + m_nYGap),
                                 Point(aOutputSize.Width(), nY * i + m_nYGap));
     }
-    const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
-    const Color aWindowTextColor(rStyleSettings.GetFieldTextColor());
-    Color aHighlightColor(rStyleSettings.GetHighlightColor());
-    Color aHighlightTextColor(rStyleSettings.GetHighlightTextColor());
-    Color aFaceColor(rStyleSettings.GetFaceColor());
-    Color aLightColor(rStyleSettings.GetLightColor());
-    Color aShadowColor(rStyleSettings.GetShadowColor());
 
     int nTextHeight = rRenderContext.GetTextHeight();
     tools::Rectangle aBoundRect;

Reply via email to