diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-09-14 20:03:33 +0200 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-09-16 23:45:10 +0200 |
commit | f9c77344c6352bd8fd4acc1fd87d55f8f5087061 (patch) | |
tree | 3334c61083b1e4d45b11cdbdad689f9363798b01 /svtools | |
parent | 1a2b2d2cf4017ffb2dd73740fc6cd0e39c32ceeb (diff) |
Make tab label padding dependent on font height.
Change-Id: I7de52945bdf3062174b49e12e2f05075632c7e4a
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/tabbar.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 3ac9f99665b6..6535462b2bcb 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -36,7 +36,6 @@ #include <limits> -#define TABBAR_PADDING 24 #define TABBAR_DRAG_SCROLLOFF 5 #define TABBAR_MINSIZE 5 @@ -607,7 +606,10 @@ bool TabBar::ImplCalcWidth() { pItem->mbShort = false; } - nNewWidth += TABBAR_PADDING; + + // Padding is dependent on font height - bigger font = bigger padding + long nFontWidth = aFont.GetHeight(); + nNewWidth += nFontWidth * 2; if ( pItem->mnWidth != nNewWidth ) { |