mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibGUI: Clip to paint event rect in most widgets.
This commit is contained in:
@@ -50,9 +50,10 @@ void GCheckBox::set_checked(bool b)
|
||||
update();
|
||||
}
|
||||
|
||||
void GCheckBox::paint_event(GPaintEvent&)
|
||||
void GCheckBox::paint_event(GPaintEvent& event)
|
||||
{
|
||||
Painter painter(*this);
|
||||
painter.set_clip_rect(event.rect());
|
||||
|
||||
auto text_rect = rect();
|
||||
text_rect.set_left(s_box_width + 4);
|
||||
|
||||
Reference in New Issue
Block a user