mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
GTableView: Fix row selection when clicking between two cells
We should still select the entire row when you click between two cells.
This commit is contained in:
parent
5f6b6c1665
commit
8031960541
Notes:
sideshowbarker
2024-07-19 12:38:30 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/80319605419
1 changed files with 2 additions and 1 deletions
|
@ -86,7 +86,7 @@ Rect GTableView::content_rect(int row, int column) const
|
|||
for (int i = 0; i < column; ++i)
|
||||
x += column_width(i) + horizontal_padding() * 2;
|
||||
|
||||
return { horizontal_padding() + row_rect.x() + x, row_rect.y(), column_width(column), item_height() };
|
||||
return { row_rect.x() + x, row_rect.y(), column_width(column) + horizontal_padding() * 2, item_height() };
|
||||
}
|
||||
|
||||
Rect GTableView::content_rect(const GModelIndex& index) const
|
||||
|
@ -190,6 +190,7 @@ GModelIndex GTableView::index_at_event_position(const Point& position) const
|
|||
continue;
|
||||
return model()->index(row, column);
|
||||
}
|
||||
return model()->index(row, 0);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue