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>
This commit is contained in:
committed by
Caolán McNamara
parent
d7f3b1effb
commit
48d09a74dd
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user