mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 14:54:57 +00:00
LibGUI: Fix row_rect(int) calculation in AbstractTableView
Previously, it didn't take into account the visibility of column headers.
This commit is contained in:
parent
e3e5e57fde
commit
32d0d00ab2
1 changed files with 4 additions and 1 deletions
|
@ -289,7 +289,10 @@ Gfx::IntRect AbstractTableView::content_rect(const ModelIndex& index) const
|
|||
|
||||
Gfx::IntRect AbstractTableView::row_rect(int item_index) const
|
||||
{
|
||||
return { row_header().is_visible() ? row_header().width() : 0, column_header().height() + (item_index * row_height()), max(content_size().width(), width()), row_height() };
|
||||
return { row_header().is_visible() ? row_header().width() : 0,
|
||||
(column_header().is_visible() ? column_header().height() : 0) + (item_index * row_height()),
|
||||
max(content_size().width(), width()),
|
||||
row_height() };
|
||||
}
|
||||
|
||||
Gfx::IntPoint AbstractTableView::adjusted_position(const Gfx::IntPoint& position) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue