mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 17:25:07 +00:00
LibGUI: Clip to paint event rect in most widgets.
This commit is contained in:
parent
737a4d2377
commit
3fe7ddadaf
5 changed files with 10 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue