1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:07:34 +00:00

ThemeEditor: Give both preview windows a background color

The inactive window previously didn't have a background fill, so it
looked odd.
This commit is contained in:
Sam Atkins 2021-10-27 10:42:31 +01:00 committed by Andreas Kling
parent 770c1935d4
commit ab1ce13eea

View file

@ -41,7 +41,6 @@ public:
private:
MiniWidgetGallery()
{
set_fill_with_background_color(true);
m_button = add<GUI::Button>();
m_button->set_text("Button");
m_checkbox = add<GUI::CheckBox>();
@ -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());