summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-02-14 12:26:47 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2023-02-15 04:07:02 +0000
commit6b756ce38364b568c28f0eba48b90a1ae4676f24 (patch)
treeaa3551f7fe7b6f934c398a91ecb55859e1f551b7
parent0287cf59e2f6a1f74e4df3ea580970465f996726 (diff)
tdf#153541 NotebookBar not getting settings change notifications
NotebookBar is a child of a BorderWindow, which is an unusual parent for a widget, special handling is needed in that case to get updated when Settings change Change-Id: I1eca5188cb3aca974281987b7b3619b77bb5f26a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146983 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--vcl/source/window/settings.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx
index 9edfaac2a546..378ba1c6004d 100644
--- a/vcl/source/window/settings.cxx
+++ b/vcl/source/window/settings.cxx
@@ -85,9 +85,14 @@ void Window::UpdateSettings( const AllSettings& rSettings, bool bChild )
if ( mpWindowImpl->mpBorderWindow )
{
mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings );
- if ( (mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW) &&
- static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->mpMenuBarWindow )
- static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->mpMenuBarWindow->UpdateSettings( rSettings, true );
+ if (mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW)
+ {
+ ImplBorderWindow* pImpl = static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get());
+ if (pImpl->mpMenuBarWindow)
+ pImpl->mpMenuBarWindow->UpdateSettings(rSettings, true);
+ if (pImpl->mpNotebookBar)
+ pImpl->mpNotebookBar->UpdateSettings(rSettings, true);
+ }
}
AllSettings aOldSettings(*mpWindowImpl->mxOutDev->moSettings);