summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/thumbnailview.hxx4
-rw-r--r--include/sfx2/thumbnailviewitem.hxx2
-rw-r--r--sfx2/source/control/templateviewitem.cxx4
-rw-r--r--sfx2/source/control/thumbnailview.cxx4
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx8
5 files changed, 18 insertions, 4 deletions
diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 96946fa09028..4af3061bb28b 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -314,8 +314,10 @@ protected:
bool mbShowTooltips : 1;
Color maFillColor; ///< Background color of the thumbnail view widget.
Color maTextColor; ///< Text color.
- Color maHighlightColor; ///< Color of the highlight (background) of the hovered / selected item.
+ Color maHighlightColor; ///< Color of the highlight (background) of the hovered item.
Color maHighlightTextColor; ///< Color of the text for the higlighted item.
+ Color maSelectHighlightColor; ///< Color of the highlight (background) of the selected and hovered item.
+ Color maSelectHighlightTextColor; ///< Color of the text of the selected and hovered item.
double mfHighlightTransparence; ///< Transparence of the highlight.
Link<const ThumbnailViewItem*, void> maItemStateHdl;
diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx
index 0ae23e552249..c37d6aac7276 100644
--- a/include/sfx2/thumbnailviewitem.hxx
+++ b/include/sfx2/thumbnailviewitem.hxx
@@ -57,6 +57,8 @@ struct ThumbnailItemAttributes
basegfx::BColor aTextColor;
basegfx::BColor aHighlightColor;
basegfx::BColor aHighlightTextColor;
+ basegfx::BColor aSelectHighlightColor;
+ basegfx::BColor aSelectHighlightTextColor;
double fHighlightTransparence;
basegfx::B2DVector aFontSize;
drawinglayer::attribute::FontAttribute aFontAttr;
diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx
index 3158a4cdea28..28dc70254562 100644
--- a/sfx2/source/control/templateviewitem.cxx
+++ b/sfx2/source/control/templateviewitem.cxx
@@ -63,7 +63,9 @@ void TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces
double fTransparence = 0.0;
// Draw background
- if ( mbSelected || mbHover )
+ if( mbSelected && mbHover)
+ aFillColor = pAttrs->aSelectHighlightColor;
+ else if (mbSelected || mbHover)
aFillColor = pAttrs->aHighlightColor;
if (mbHover)
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index c8f2aa6727ba..78e0569069c0 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -150,6 +150,8 @@ void ThumbnailView::ImplInit()
maTextColor = GetSettings().GetStyleSettings().GetWindowTextColor();
maHighlightColor = GetSettings().GetStyleSettings().GetHighlightColor();
maHighlightTextColor = GetSettings().GetStyleSettings().GetWindowTextColor();
+ maSelectHighlightColor = GetSettings().GetStyleSettings().GetActiveColor();
+ maSelectHighlightTextColor = GetSettings().GetStyleSettings().GetActiveTextColor();
const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
mfHighlightTransparence = aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01;
@@ -206,6 +208,8 @@ void ThumbnailView::ApplySettings(vcl::RenderContext& rRenderContext)
mpItemAttrs->aTextColor = maTextColor.getBColor();
mpItemAttrs->aHighlightColor = maHighlightColor.getBColor();
mpItemAttrs->aHighlightTextColor = maHighlightTextColor.getBColor();
+ mpItemAttrs->aSelectHighlightColor = maSelectHighlightColor.getBColor();
+ mpItemAttrs->aSelectHighlightTextColor = maSelectHighlightTextColor.getBColor();
mpItemAttrs->fHighlightTransparence = mfHighlightTransparence;
mpItemAttrs->aFontAttr = getFontAttributeFromVclFont(mpItemAttrs->aFontSize,GetFont(),false,true);
mpItemAttrs->nMaxTextLength = 0;
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index 0e36b29a9bec..3690ae020cab 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -151,7 +151,9 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
double fTransparence = 0.0;
// Draw background
- if (mbSelected || mbHover)
+ if( mbSelected && mbHover)
+ aFillColor = pAttrs->aSelectHighlightColor;
+ else if (mbSelected || mbHover)
aFillColor = pAttrs->aHighlightColor;
if (mbHover)
@@ -246,7 +248,9 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai
// setup color
BColor aTextColor = pAttrs->aTextColor;
- if (mbSelected || mbHover)
+ if( mbSelected && mbHover)
+ aTextColor = pAttrs->aSelectHighlightTextColor;
+ else if (mbSelected || mbHover)
aTextColor = pAttrs->aHighlightTextColor;
rSeq[nPrimitives++] = drawinglayer::primitive2d::Primitive2DReference(