From 48d09a74dd0be232bf01e008f970c6c726e8f33a Mon Sep 17 00:00:00 2001 From: Isamu Mogi Date: Sat, 22 Mar 2014 11:53:47 +0900 Subject: [PATCH] fdo#68546 Update settings for MenuBarWindow in InitStyleSettings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Caolán McNamara --- vcl/source/window/menu.cxx | 9 +++++---- 1 file 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 ); } }