diff options
author | Efe Gürkan YALAMAN <efeyalaman@gmail.com> | 2014-09-16 02:30:59 +0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-25 12:28:41 +0000 |
commit | 5911154175b381b96991ec13c3d3d4619ad13d1d (patch) | |
tree | e7b3836e9a8dba560455bc28966960168518374b /sfx2/source/control/templatecontaineritem.cxx | |
parent | 86af599c81dc695400b0cc999f559bcf9070e8b9 (diff) |
Start Center Template Manager Tweaks
Template Manager and the related Start Center view has same
transparent highlight color as Recent Documents. Also Template
thumbnail containers should have the same size as Recent Docs view.
Change-Id: I22e417a5c5ca5a849577d5a438a193371368fe24
Reviewed-on: https://gerrit.libreoffice.org/11467
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/control/templatecontaineritem.cxx')
-rw-r--r-- | sfx2/source/control/templatecontaineritem.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sfx2/source/control/templatecontaineritem.cxx b/sfx2/source/control/templatecontaineritem.cxx index 2ad7b9f3e7ee..d16cb69ff683 100644 --- a/sfx2/source/control/templatecontaineritem.cxx +++ b/sfx2/source/control/templatecontaineritem.cxx @@ -22,6 +22,7 @@ #include <sfx2/templateviewitem.hxx> #include <vcl/button.hxx> #include <vcl/graph.hxx> +#include <svtools/optionsdrawinglayer.hxx> using namespace basegfx; using namespace basegfx::tools; @@ -67,14 +68,24 @@ void TemplateContainerItem::Paint (drawinglayer::processor2d::BaseProcessor2D *p BColor aFillColor = pAttrs->aFillColor; drawinglayer::primitive2d::Primitive2DSequence aSeq(nSeqSize); + double fTransparence = 0.0; // Draw background if ( mbSelected || mbHover ) aFillColor = pAttrs->aHighlightColor; - aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonColorPrimitive2D( + if (mbHover) + { + const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; + fTransparence = aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01; + } + + aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonSelectionPrimitive2D( B2DPolyPolygon(Polygon(maDrawArea,5,5).getB2DPolygon()), - aFillColor)); + aFillColor, + fTransparence, + 0.0, + true)); // Create rounded rectangle border aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference( new PolygonStrokePrimitive2D( |