summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsamu Mogi <saturday6c@gmail.com>2014-03-22 11:53:47 +0900
committerCaolán McNamara <caolanm@redhat.com>2014-03-28 11:29:38 +0000
commit48d09a74dd0be232bf01e008f970c6c726e8f33a (patch)
treecd34b1b323b4c7bb756beffd5ab379f0f4936a77
parentd7f3b1effb63aab91d993209784ef5678752fea8 (diff)
fdo#68546 Update settings for MenuBarWindow in InitStyleSettings
It updates menubar's text color settings in StyleSettings when user changes persona. Change-Id: Ic9c3e8073b9188a792823a84bf78b9b5976af50d Reviewed-on: https://gerrit.libreoffice.org/8713 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/window/menu.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 2bd976881439..88e2b9ec92f5 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -6004,15 +6004,16 @@ void MenuBarWindow::ImplInitStyleSettings()
if( IsNativeControlSupported( CTRL_MENUBAR, PART_MENU_ITEM ) &&
IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) )
{
+ AllSettings aSettings( GetSettings() );
+ ImplGetFrame()->UpdateSettings( aSettings ); // to update persona
+ StyleSettings aStyle( aSettings.GetStyleSettings() );
Color aHighlightTextColor = ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor;
if( aHighlightTextColor != Color( COL_TRANSPARENT ) )
{
- AllSettings aSettings( GetSettings() );
- StyleSettings aStyle( aSettings.GetStyleSettings() );
aStyle.SetMenuHighlightTextColor( aHighlightTextColor );
- aSettings.SetStyleSettings( aStyle );
- OutputDevice::SetSettings( aSettings );
}
+ aSettings.SetStyleSettings( aStyle );
+ OutputDevice::SetSettings( aSettings );
}
}