1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibGUI: Paint CheckBox background same as widget's if it's not enabled

This commit is contained in:
Andres Vieira 2020-04-28 13:49:14 +02:00 committed by Andreas Kling
parent b9df3c3318
commit 711bcff0da

View file

@ -79,7 +79,7 @@ void CheckBox::paint_event(PaintEvent& event)
0, height() / 2 - s_box_height / 2 - 1,
s_box_width, s_box_height
};
painter.fill_rect(box_rect, palette().base());
painter.fill_rect(box_rect, is_enabled() ? palette().base() : palette().window());
Gfx::StylePainter::paint_frame(painter, box_rect, palette(), Gfx::FrameShape::Container, Gfx::FrameShadow::Sunken, 2);
if (is_being_pressed())