summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-03-08 14:48:17 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-03-10 14:04:33 +0900
commitb03a9ae9588f2d2ffd1460f6696d716f0799b769 (patch)
tree6ecf90bec4b7061789b0b2a4e7cc978260d31fc1 /svtools
parent23a1717881ebfa3638b969aa4bad38a81d26d29d (diff)
tabbar: use symbol "plus" instead of image for adding tabs
Change-Id: I425005534b9b73c3450112fd9a30035985cc38e1
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/tabbar.cxx17
1 files changed, 5 insertions, 12 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index b903d955605d..141758d049f5 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -1195,25 +1195,18 @@ public:
void drawPlusImage()
{
- SvtResId aPlusImageId(BMP_LIST_ADD);
- Image aPlusImage(aPlusImageId);
+ const StyleSettings& rStyleSettings = mrParent.GetSettings().GetStyleSettings();
+ DecorationView aDecorationView(&mrParent);
sal_Int32 aScaleFactor = mrParent.GetDPIScaleFactor();
- if (aScaleFactor > 1)
- {
- BitmapEx aBitmap = aPlusImage.GetBitmapEx();
- aBitmap.Scale(aScaleFactor, aScaleFactor, BMP_SCALE_FAST);
- aPlusImage = Image(aBitmap);
- }
+ Size aSize(12 * aScaleFactor, 12 * aScaleFactor);
- // Center the image within the bounding rectangle.
- Size aSize = aPlusImage.GetSizePixel();
Point aPosition = maRect.TopLeft();
long nXOffSet = (maRect.GetWidth() - aSize.Width()) / 2;
long nYOffset = (maRect.GetHeight() - aSize.Height()) / 2;
aPosition += Point(nXOffSet, nYOffset);
- aPosition.X() += 1;
- mrParent.DrawImage(aPosition, aPlusImage);
+
+ aDecorationView.DrawSymbol(Rectangle(aPosition, aSize), SymbolType::PLUS, rStyleSettings.GetDarkShadowColor());
}
void setRect(const Rectangle& rRect)