summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-05-30 17:18:29 +0900
committerTomaž Vajngerl <quikee@gmail.com>2019-05-31 09:25:33 +0200
commit35870d411de99f278507785c4386dd02f9537073 (patch)
treec5eb9474df42172fb88e5c78b178ecf599e45866 /svtools
parent966dc7f2cf500bb529394e1865e2cc6e5b264ab0 (diff)
tdf#124572 Reduce tab bar item width
The width of an tab item is now reduced and is increased by the icon width when the protected icon needs to be drawn (so on demand). Change-Id: Ib4a4742b28ebab21d33e9408e3c416b1f28c6ac2 Reviewed-on: https://gerrit.libreoffice.org/73208 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/tabbar.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 74623f18db65..f1dbc69bccb0 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -668,7 +668,9 @@ bool TabBar::ImplCalcWidth()
// Padding is dependent on font height - bigger font = bigger padding
long nFontWidth = aFont.GetFontHeight();
- nNewWidth += nFontWidth * 5;
+ if (pItem->mbProtect)
+ nNewWidth += 24;
+ nNewWidth += nFontWidth * 2;
if (pItem->mnWidth != nNewWidth)
{