summaryrefslogtreecommitdiff
path: root/svtools/source
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/source
parentb8f21298288890d52c06fef6c84441634c56c986 (diff)
add margin before/after button handles in tabbar
Change-Id: Id9b16fc4168febd217a2d263a158daca85fdea38
Diffstat (limited to 'svtools/source')
-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;