From ab1ce13eea9d813ddbb40fe7e16e36fff05f2f0b Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 27 Oct 2021 10:42:31 +0100 Subject: [PATCH] ThemeEditor: Give both preview windows a background color The inactive window previously didn't have a background fill, so it looked odd. --- Userland/Applications/ThemeEditor/PreviewWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Applications/ThemeEditor/PreviewWidget.cpp b/Userland/Applications/ThemeEditor/PreviewWidget.cpp index ff4443d30d..74fd984d2d 100644 --- a/Userland/Applications/ThemeEditor/PreviewWidget.cpp +++ b/Userland/Applications/ThemeEditor/PreviewWidget.cpp @@ -41,7 +41,6 @@ public: private: MiniWidgetGallery() { - set_fill_with_background_color(true); m_button = add(); m_button->set_text("Button"); m_checkbox = add(); @@ -145,6 +144,8 @@ void PreviewWidget::paint_event(GUI::PaintEvent& event) button.rect = rect; } + painter.fill_rect(rect, m_preview_palette.window()); + auto frame_rect = Gfx::WindowTheme::current().frame_rect_for_window(Gfx::WindowTheme::WindowType::Normal, rect, m_preview_palette, 0); Gfx::PainterStateSaver saver(painter); painter.translate(frame_rect.location());