[PATCH] Don't make tab headers bold by default

Norbert Thiebaud nthiebaud at gmail.com
Sat May 26 09:45:26 PDT 2012


On Fri, May 25, 2012 at 12:07 PM, Stefan Knorr (Astron)
<heinzlesspam at googlemail.com> wrote:
> Hi there,
>
> I've always wondered why LibreOffice (and before it Ooo) would make
> the selected tab header bold, because no OS I know does that natively.
> While there is an option with which backends could turn this behaviour
> off, if there's no need for that we probably should remove it, I
> guess.
> Attached patch does that and even works. Can I push or is there
> something that seems wrong?


I'm confused:

@@ -723,9 +705,7 @@ void TabControl::ImplShowFocus()
     // make sure the focussed item rect is computed using a bold font
     // the font may have changed meanwhile due to mouse over

-    Font aOldFont( GetFont() );
-    Font aFont( aOldFont );
-    aFont.SetWeight( (!ImplGetSVData()->maNWFData.mbNoBoldTabFocus) ?
WEIGHT_BOLD : WEIGHT_LIGHT );
+    Font aFont( GetFont() );
     SetFont( aFont );
^^^ you are setting the Font to the same thing it used to have here no
(since you remove the code that used to potentially alter it)?

     sal_uInt16                   nCurPos     = GetPagePos( mnCurPageId );
@@ -771,8 +751,7 @@ void TabControl::ImplShowFocus()
         aRect.Bottom() = aRect.Top() + aImageSize.Height() + 4;
     }
     ShowFocus( aRect );
-
-    SetFont( aOldFont );
+    SetFont( aFont );
 }

Why the last SetFont() ? you are not messing with the font anymore
right ? so it has not changed... no need to restore it, no?

Norbert


More information about the LibreOffice mailing list