mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
SharedGraphics: Make Painter clipping work with translated clip origin.
This commit is contained in:
parent
8eefdbdce8
commit
fd428d6ed3
6 changed files with 20 additions and 9 deletions
|
@ -28,9 +28,10 @@ String GStatusBar::text() const
|
|||
return m_label->text();
|
||||
}
|
||||
|
||||
void GStatusBar::paint_event(GPaintEvent&)
|
||||
void GStatusBar::paint_event(GPaintEvent& event)
|
||||
{
|
||||
Painter painter(*this);
|
||||
painter.set_clip_rect(event.rect());
|
||||
painter.fill_rect({ 0, 1, width(), height() - 1 }, Color::LightGray);
|
||||
painter.draw_line({ 0, 0 }, { width() - 1, 0 }, Color::DarkGray);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue