Resolves: tdf#141857 update background to current theme
Change-Id: I1004bd9944f382ca66e48575b81170cf3314845f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115092
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 630e960..df7f522 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -100,7 +100,13 @@ public:
virtual void StyleUpdated() override
{
const bool bIsDark = Application::GetSettings().GetStyleSettings().GetDialogColor().IsDark();
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
// tdf#141857 update background to current theme
OutputDevice& rDevice = GetDrawingArea()->get_ref_device();
rDevice.SetBackground(Wallpaper(rStyleSettings.GetWindowColor()));
const bool bIsDark = rStyleSettings.GetDialogColor().IsDark();
if (bIsDark != mbIsDark)
LoadImageForWidth(GetOutputSizePixel().Width());
weld::CustomWidgetController::StyleUpdated();