mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:35:07 +00:00
LibGUI: Account for the row and column headers when painting a TableView
Otherwise we'd be drawing all the rows, instead of the ones in view. Fixes #5483.
This commit is contained in:
parent
6a6f19a72f
commit
ecc8e99a6b
1 changed files with 2 additions and 2 deletions
|
@ -73,8 +73,8 @@ void TableView::paint_event(PaintEvent& event)
|
|||
int y_offset = column_header().is_visible() ? column_header().height() : 0;
|
||||
|
||||
bool dummy;
|
||||
int first_visible_row = index_at_event_position(frame_inner_rect().top_left(), dummy).row();
|
||||
int last_visible_row = index_at_event_position(frame_inner_rect().bottom_right(), dummy).row();
|
||||
int first_visible_row = index_at_event_position(frame_inner_rect().top_left().translated(x_offset, y_offset), dummy).row();
|
||||
int last_visible_row = index_at_event_position(frame_inner_rect().bottom_right().translated(x_offset, y_offset), dummy).row();
|
||||
|
||||
if (first_visible_row == -1)
|
||||
first_visible_row = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue