Resolves: tdf#141857 update background to current theme

Change-Id: I1004bd9944f382ca66e48575b81170cf3314845f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115073
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 01d8923..1a2834b 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -103,7 +103,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();