diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-19 17:06:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-08-20 10:09:15 +0200 |
commit | b39364492c7cbe34923e0d0755db8737b7d6225a (patch) | |
tree | a725ba76d91d1a9acde981fc405522c3ac24065b /sfx2 | |
parent | bcf8868e031f916473f13bcd1a0835c74cb05de5 (diff) |
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@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailviewitem.cxx | 11 |
2 files changed, 9 insertions, 6 deletions
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, |