diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-29 16:56:15 +0900 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-29 20:16:51 +0200 |
commit | b99aed3422288390ba7ad4bc6f42a6f69e1dedd9 (patch) | |
tree | c2ce0912d5a7ef35d1278175e7018058b8eb22a0 | |
parent | ece70177d5644b9395682e79628982f4be8b4fe7 (diff) |
menu: call ApplySettings on places that InitSettings was called
Change-Id: I5519cf6a8e77a7da27fa883f2f7695ae4371af88
Signed-off-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r-- | vcl/source/window/menubarwindow.cxx | 5 | ||||
-rw-r--r-- | vcl/source/window/menufloatingwindow.cxx | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index dd2e9c699199..7cbc158d0128 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -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(); } diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 0093ba1949ca..abebd19443e7 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -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(); } } |