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
commit 711bcff0da
Notes: sideshowbarker 2024-07-19 07:13:36 +09:00

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())