Kaydet (Commit) 9ce71b67 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

menu: call ApplySettings on places that InitSettings was called

Change-Id: I5519cf6a8e77a7da27fa883f2f7695ae4371af88
üst b0922150
......@@ -990,6 +990,7 @@ void MenuBarWindow::StateChanged( StateChangedType nType )
if (nType == StateChangedType::ControlForeground ||
nType == StateChangedType::ControlBackground)
{
ApplySettings(*this);
Invalidate();
}
else if(pMenu)
......@@ -1003,6 +1004,8 @@ void MenuBarWindow::LayoutChanged()
if (!pMenu)
return;
ApplySettings(*this);
// if the font was changed.
long nHeight = pMenu->ImplCalcSize(this).Height();
......@@ -1023,6 +1026,7 @@ void MenuBarWindow::LayoutChanged()
void MenuBarWindow::ApplySettings(vcl::RenderContext& rRenderContext)
{
Window::ApplySettings(rRenderContext);
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
SetPointFont(rRenderContext, rStyleSettings.GetMenuFont());
......@@ -1083,6 +1087,7 @@ void MenuBarWindow::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) )
{
ApplySettings(*this);
ImplInitStyleSettings();
LayoutChanged();
}
......
......@@ -46,6 +46,7 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, vcl::Window* pParent, WinBit
bKeyInput = false;
EnableSaveBackground();
ApplySettings(*this);
SetPopupModeEndHdl( LINK( this, MenuFloatingWindow, PopupEnd ) );
......@@ -120,6 +121,8 @@ void MenuFloatingWindow::Resize()
void MenuFloatingWindow::ApplySettings(vcl::RenderContext& rRenderContext)
{
FloatingWindow::ApplySettings(rRenderContext);
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
SetPointFont(rRenderContext, rStyleSettings.GetMenuFont());
......@@ -1214,6 +1217,7 @@ void MenuFloatingWindow::StateChanged( StateChangedType nType )
if ( ( nType == StateChangedType::ControlForeground ) || ( nType == StateChangedType::ControlBackground ) )
{
ApplySettings(*this);
Invalidate();
}
}
......@@ -1227,6 +1231,7 @@ void MenuFloatingWindow::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) )
{
ApplySettings(*this);
Invalidate();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment