From f9c77344c6352bd8fd4acc1fd87d55f8f5087061 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Sun, 14 Sep 2014 20:03:33 +0200 Subject: Make tab label padding dependent on font height. Change-Id: I7de52945bdf3062174b49e12e2f05075632c7e4a --- svtools/source/control/tabbar.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'svtools') 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 -#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 ) { -- cgit