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>
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 74623f1..f1dbc69 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)
        {