[Libreoffice-commits] core.git: include/vcl vcl/android vcl/ios vcl/osx vcl/source vcl/unx vcl/win

Caolán McNamara caolanm at redhat.com
Tue Apr 28 01:14:38 PDT 2015


 include/vcl/settings.hxx                      |    3 +++
 vcl/android/androidinst.cxx                   |    1 +
 vcl/ios/iosinst.cxx                           |    1 +
 vcl/osx/salframe.cxx                          |    1 +
 vcl/source/app/settings.cxx                   |   17 +++++++++++++++++
 vcl/source/control/tabctrl.cxx                |    2 +-
 vcl/source/window/settings.cxx                |    6 ++++++
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx      |    1 +
 vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx |    1 +
 vcl/unx/kde/salnativewidgets-kde.cxx          |    1 +
 vcl/unx/kde4/KDESalFrame.cxx                  |    1 +
 vcl/win/source/window/salframe.cxx            |    1 +
 12 files changed, 35 insertions(+), 1 deletion(-)

New commits:
commit 9a9dd94c568da830d70c736cdf827a2bc48988f5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 27 21:04:07 2015 +0100

    allow a different notebook tab font than the rest of the ui
    
    Change-Id: Ia41276033c1f656217bc3ae929faab001db36ca4

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 1775e09..9f5a0cb 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -426,6 +426,9 @@ public:
     void                            SetIconFont( const vcl::Font& rFont );
     const vcl::Font&                GetIconFont() const;
 
+    void                            SetTabFont( const vcl::Font& rFont );
+    const vcl::Font&                GetTabFont() const;
+
     long                            GetBorderSize() const;
 
     void                            SetTitleHeight( long nSize );
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 5b766d5..6099536 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -278,6 +278,7 @@ public:
         aStyleSet.SetPushButtonFont( aFont );
         aStyleSet.SetFieldFont( aFont );
         aStyleSet.SetIconFont( aFont );
+        aStyleSet.SetTabFont( aFont );
         aStyleSet.SetGroupFont( aFont );
 
         rSettings.SetStyleSettings( aStyleSet );
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index 8356e8e..f2dabd5 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -159,6 +159,7 @@ public:
         aStyleSet.SetPushButtonFont( aFont );
         aStyleSet.SetFieldFont( aFont );
         aStyleSet.SetIconFont( aFont );
+        aStyleSet.SetTabFont( aFont );
         aStyleSet.SetGroupFont( aFont );
 
         rSettings.SetStyleSettings( aStyleSet );
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index beb188d..b23b3e6 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1176,6 +1176,7 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings )
     aStyleSettings.SetRadioCheckFont( aLabelFont );
     aStyleSettings.SetFieldFont( aLabelFont );
     aStyleSettings.SetGroupFont( aLabelFont );
+    aStyleSettings.SetTabFont( aLabelFont );
     aStyleSettings.SetIconFont( aLabelFont );
 
     Color aHighlightColor( getColor( [NSColor selectedTextBackgroundColor],
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 70511c5..4f81689 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -146,6 +146,7 @@ struct ImplStyleData
     vcl::Font                       maPushButtonFont;
     vcl::Font                       maFieldFont;
     vcl::Font                       maIconFont;
+    vcl::Font                       maTabFont;
     vcl::Font                       maGroupFont;
     long                            mnBorderSize;
     long                            mnTitleHeight;
@@ -617,6 +618,7 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
     maPushButtonFont( rData.maPushButtonFont ),
     maFieldFont( rData.maFieldFont ),
     maIconFont( rData.maIconFont ),
+    maTabFont( rData.maTabFont ),
     maGroupFont( rData.maGroupFont ),
     mIconTheme(rData.mIconTheme),
     maDialogStyle( rData.maDialogStyle ),
@@ -687,6 +689,7 @@ void ImplStyleData::SetStandardStyles()
     maPushButtonFont            = aStdFont;
     maFieldFont                 = aStdFont;
     maIconFont                  = aStdFont;
+    maTabFont                   = aStdFont;
     aStdFont.SetWeight( WEIGHT_BOLD );
     maFloatTitleFont            = aStdFont;
     maTitleFont                 = aStdFont;
@@ -1661,6 +1664,19 @@ StyleSettings::GetIconFont() const
     return mxData->maIconFont;
 }
 
+void
+StyleSettings::SetTabFont( const vcl::Font& rFont )
+{
+    CopyData();
+    mxData->maTabFont = rFont;
+}
+
+const vcl::Font&
+StyleSettings::GetTabFont() const
+{
+    return mxData->maTabFont;
+}
+
 long
 StyleSettings::GetBorderSize() const
 {
@@ -2312,6 +2328,7 @@ bool StyleSettings::operator ==( const StyleSettings& rSet ) const
          (mxData->maPushButtonFont          == rSet.mxData->maPushButtonFont)           &&
          (mxData->maFieldFont               == rSet.mxData->maFieldFont)                &&
          (mxData->maIconFont                == rSet.mxData->maIconFont)                 &&
+         (mxData->maTabFont                 == rSet.mxData->maTabFont)                  &&
          (mxData->meUseImagesInMenus        == rSet.mxData->meUseImagesInMenus)         &&
          (mxData->mbPreferredUseImagesInMenus == rSet.mxData->mbPreferredUseImagesInMenus) &&
          (mxData->mbSkipDisabledInMenus     == rSet.mxData->mbSkipDisabledInMenus)      &&
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 3d54413..ca63e54 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -129,7 +129,7 @@ void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle )
 
 const vcl::Font& TabControl::GetCanonicalFont( const StyleSettings& _rStyle ) const
 {
-    return _rStyle.GetAppFont();
+    return _rStyle.GetTabFont();
 }
 
 const Color& TabControl::GetCanonicalTextColor( const StyleSettings& _rStyle ) const
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx
index 77ddce2..3e60bbd 100644
--- a/vcl/source/window/settings.cxx
+++ b/vcl/source/window/settings.cxx
@@ -226,6 +226,9 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl )
     aFont = aStyleSettings.GetIconFont();
     aFont.SetHeight( defFontheight );
     aStyleSettings.SetIconFont( aFont );
+    aFont = aStyleSettings.GetTabFont();
+    aFont.SetHeight( defFontheight );
+    aStyleSettings.SetTabFont( aFont );
     aFont = aStyleSettings.GetGroupFont();
     aFont.SetHeight( defFontheight );
     aStyleSettings.SetGroupFont( aFont );
@@ -294,6 +297,9 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl )
         aFont = aStyleSettings.GetIconFont();
         aFont.SetWeight( WEIGHT_BOLD );
         aStyleSettings.SetIconFont( aFont );
+        aFont = aStyleSettings.GetTabFont();
+        aFont.SetWeight( WEIGHT_BOLD );
+        aStyleSettings.SetTabFont( aFont );
         rSettings.SetStyleSettings( aStyleSettings );
     }
 #endif
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 878540f..64cc7de 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -4136,6 +4136,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
     aStyleSet.SetPushButtonFont( aFont );
     aStyleSet.SetFieldFont( aFont );
     aStyleSet.SetIconFont( aFont );
+    aStyleSet.SetTabFont( aFont );
     aStyleSet.SetGroupFont( aFont );
 
     aFont.SetWeight( WEIGHT_BOLD );
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 9bf9824..8a141a4 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -1387,6 +1387,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
     aStyleSet.SetGroupFont( aFont );
 
     aFont.SetWeight( WEIGHT_BOLD );
+    aStyleSet.SetTabFont( aFont );  //pull from notebook style + GTK_STYLE_REGION_TAB ?
     aStyleSet.SetTitleFont( aFont );
     aStyleSet.SetFloatTitleFont( aFont );
     // get cursor blink time
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index aa873b8..69c00ba 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1944,6 +1944,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
     aStyleSettings.SetPushButtonFont( aFont );
     aStyleSettings.SetFieldFont( aFont );
     aStyleSettings.SetIconFont( aFont );
+    aStyleSettings.SetTabFont( aFont );
     aStyleSettings.SetGroupFont( aFont );
 
     aFont.SetWeight( WEIGHT_BOLD );
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 173ba12..c358f4d 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -267,6 +267,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
     style.SetPushButtonFont( aFont );
     style.SetFieldFont( aFont );
     style.SetIconFont( aFont );
+    style.SetTabFont( aFont );
     style.SetGroupFont( aFont );
 
     aFont.SetWeight( WEIGHT_BOLD );
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index e9da734..12b8f3e 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2812,6 +2812,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
         aAppFont.SetWeight( WEIGHT_NORMAL );
     aStyleSettings.SetInfoFont( aAppFont );
     aStyleSettings.SetToolFont( aAppFont );
+    aStyleSettings.SetTabFont( aAppFont );
 
     BOOL bDragFull;
     if ( SystemParametersInfo( SPI_GETDRAGFULLWINDOWS, 0, &bDragFull, 0 ) )


More information about the Libreoffice-commits mailing list