mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
LibGUI: Clip to paint event rect in most widgets.
This commit is contained in:
parent
737a4d2377
commit
3fe7ddadaf
Notes:
sideshowbarker
2024-07-19 15:35:15 +09:00
Author: https://github.com/awesomekling
Commit: 3fe7ddadaf
5 changed files with 10 additions and 5 deletions
|
@ -22,9 +22,10 @@ void GButton::set_caption(String&& caption)
|
|||
update();
|
||||
}
|
||||
|
||||
void GButton::paint_event(GPaintEvent&)
|
||||
void GButton::paint_event(GPaintEvent& event)
|
||||
{
|
||||
Painter painter(*this);
|
||||
painter.set_clip_rect(event.rect());
|
||||
|
||||
GStyle::the().paint_button(painter, rect(), m_button_style, m_being_pressed, m_hovered);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue