summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorAkshay Deep <akshaydeepiitr@gmail.com>2016-06-07 16:27:25 +0530
committerAkshay Deep <akshaydeepiitr@gmail.com>2016-06-08 14:33:13 +0000
commit32540a1e2339f00608ac689e6c4b8083a0007974 (patch)
treefea0616c5778dca3c7798b8ca860a8f4399ab5d9 /sfx2
parente14f7bcfafe951a6b59a6635865fb31ae9c259bd (diff)
Missing selected + hover state in Template Manager
Change-Id: I35c91cea34953a5c4a78031eb809001e902197f1 Reviewed-on: https://gerrit.libreoffice.org/26013 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 934908168ebdb4a021e18e6bea57accc21d5ad86) Reviewed-on: https://gerrit.libreoffice.org/26067 Reviewed-by: Akshay Deep <akshaydeepiitr@gmail.com> Tested-by: Akshay Deep <akshaydeepiitr@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/templateviewitem.cxx4
-rw-r--r--sfx2/source/control/thumbnailview.cxx4
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx8
3 files changed, 13 insertions, 3 deletions
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 7a501ea9d977..c279eb279d35 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(