summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-27 21:04:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-28 09:14:06 +0100
commit9a9dd94c568da830d70c736cdf827a2bc48988f5 (patch)
tree678e4e9e0b092128f159143b8b35821611212a38 /vcl/source
parent95a29424abe1c588c68d737ec50ea780375a9334 (diff)
allow a different notebook tab font than the rest of the ui
Change-Id: Ia41276033c1f656217bc3ae929faab001db36ca4
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/settings.cxx17
-rw-r--r--vcl/source/control/tabctrl.cxx2
-rw-r--r--vcl/source/window/settings.cxx6
3 files changed, 24 insertions, 1 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 70511c58880a..4f81689c939e 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 3d544133c398..ca63e5485d68 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 77ddce2d58a7..3e60bbd9bab0 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