[Libreoffice-commits] core.git: sfx2/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 20 08:09:53 UTC 2020


 sfx2/source/control/thumbnailview.cxx     |    4 ++--
 sfx2/source/control/thumbnailviewitem.cxx |   11 +++++++----
 2 files changed, 9 insertions(+), 6 deletions(-)

New commits:
commit b39364492c7cbe34923e0d0755db8737b7d6225a
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Aug 19 17:06:26 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Aug 20 10:09:15 2020 +0200

    use HighlightTextColor from Settings for thumbnailviewitem HighlightTextColor
    
    so if an icon is selected, typically with a blue background, that
    the text is rendered with a matching color, typically white foreground
    
    Change-Id: I3397924ccf657a9d2bd3c03c51c339685c27d5ae
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101024
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index b37cb617b974..f0eae308158f 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -137,7 +137,7 @@ void ThumbnailView::ImplInit()
     maFillColor = GetSettings().GetStyleSettings().GetFieldColor();
     maTextColor = GetSettings().GetStyleSettings().GetWindowTextColor();
     maHighlightColor = GetSettings().GetStyleSettings().GetHighlightColor();
-    maHighlightTextColor = GetSettings().GetStyleSettings().GetWindowTextColor();
+    maHighlightTextColor = GetSettings().GetStyleSettings().GetHighlightTextColor();
     maSelectHighlightColor = GetSettings().GetStyleSettings().GetActiveColor();
     maSelectHighlightTextColor = GetSettings().GetStyleSettings().GetActiveTextColor();
 
@@ -1321,7 +1321,7 @@ void SfxThumbnailView::ImplInit()
     maFillColor = rSettings.GetFieldColor();
     maTextColor = rSettings.GetWindowTextColor();
     maHighlightColor = rSettings.GetHighlightColor();
-    maHighlightTextColor = rSettings.GetWindowTextColor();
+    maHighlightTextColor = rSettings.GetHighlightTextColor();
     maSelectHighlightColor = rSettings.GetActiveColor();
     maSelectHighlightTextColor = rSettings.GetActiveTextColor();
 
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index 40a68ec3ed20..b3be4b5357c9 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -249,10 +249,13 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai
 
         // setup color
         BColor aTextColor = pAttrs->aTextColor;
-        if( mbSelected && mbHover)
-            aTextColor = pAttrs->aSelectHighlightTextColor;
-        else if (mbSelected || mbHover)
-            aTextColor = pAttrs->aHighlightTextColor;
+        if(mbSelected)
+        {
+            if (mbHover)
+                aTextColor = pAttrs->aSelectHighlightTextColor;
+            else
+                aTextColor = pAttrs->aHighlightTextColor;
+        }
 
         rSeq[nPrimitives++] = drawinglayer::primitive2d::Primitive2DReference(
                     new TextSimplePortionPrimitive2D(aTextMatrix,


More information about the Libreoffice-commits mailing list