diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-02-14 12:26:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-02-14 19:59:23 +0000 |
commit | ab07248af6fd7c6af631875cecb759ecf1ad1e7a (patch) | |
tree | 5bfb7f017409d66503f77176c68e6870cf040e83 /vcl | |
parent | e2d8474857e8b39efcdf21441c95ad51a8aef6e8 (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/+/147008
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/settings.cxx | 11 |
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); |