mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 03:55:07 +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
|
@ -92,9 +92,10 @@ void GTableView::mousedown_event(GMouseEvent& event)
|
|||
update();
|
||||
}
|
||||
|
||||
void GTableView::paint_event(GPaintEvent&)
|
||||
void GTableView::paint_event(GPaintEvent& event)
|
||||
{
|
||||
Painter painter(*this);
|
||||
painter.set_clip_rect(event.rect());
|
||||
painter.translate(-m_horizontal_scrollbar->value(), -m_vertical_scrollbar->value());
|
||||
|
||||
int exposed_width = max(content_width(), width());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue