mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-13 22:52:52 +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
Notes:
sideshowbarker
2024-07-19 02:19:39 +09:00
Author: https://github.com/itamar8910
Commit: 32d0d00ab2
Pull-request: https://github.com/SerenityOS/serenity/pull/3560
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