summaryrefslogtreecommitdiffstats
path: root/svtools
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-03-03 10:44:03 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-03-05 09:46:49 +0900
commitcfab9854f1f0b133169a50528354f19ad37d87fc (patch)
tree5df7dc96ee52a54a4ee21cbad37d2e460c6caeb8 /svtools
parenttoolbox - preserve the orig. image + use it in menu & color update (diff)
downloadcore-cfab9854f1f0b133169a50528354f19ad37d87fc.tar.gz
core-cfab9854f1f0b133169a50528354f19ad37d87fc.zip
add margin before/after button handles in tabbar
Change-Id: Id9b16fc4168febd217a2d263a158daca85fdea38
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/tabbar.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 2477d8c3f140..217174cc960e 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -42,6 +42,7 @@ namespace {
const sal_uInt16 ADDNEWPAGE_AREAWIDTH = 10;
const sal_uInt16 INSERT_TAB_WIDTH = 32;
+const sal_uInt16 BUTTON_MARGIN = 6;
} // anonymous namespace
@@ -1442,9 +1443,13 @@ void TabBar::Resize()
// adapt font height?
ImplInitSettings( true, false );
- long nX = mbMirrored ? (aNewSize.Width()-nHeight) : 0;
+ long nButtonMargin = BUTTON_MARGIN * GetDPIScaleFactor();
+
+ long nX = mbMirrored ? (aNewSize.Width() - nHeight - nButtonMargin) : nButtonMargin;
long nXDiff = mbMirrored ? -nHeight : nHeight;
+ nButtonWidth += nButtonMargin;
+
Size aBtnSize( nHeight, nHeight );
if ( mpFirstBtn )
{
@@ -1471,6 +1476,8 @@ void TabBar::Resize()
nButtonWidth += nHeight;
}
+ nButtonWidth += nButtonMargin;
+
// store size
maWinSize = aNewSize;