mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-13 14:42:51 +00:00
LibGUI: Add AbstractTableView::scroll_into_view(ModelIndex, bool, bool)
This API lets you specify whether to scroll horizontally, vertically, or both.
This commit is contained in:
parent
4c65bd3731
commit
e5a6e297bf
Notes:
sideshowbarker
2024-07-19 03:12:17 +09:00
Author: https://github.com/awesomekling
Commit: e5a6e297bf
2 changed files with 7 additions and 0 deletions
Libraries/LibGUI
|
@ -460,6 +460,12 @@ void AbstractTableView::scroll_into_view(const ModelIndex& index, Orientation or
|
|||
ScrollableWidget::scroll_into_view(rect, orientation);
|
||||
}
|
||||
|
||||
void AbstractTableView::scroll_into_view(const ModelIndex& index, bool scroll_horizontally, bool scroll_vertically)
|
||||
{
|
||||
auto rect = row_rect(index.row()).translated(0, -header_height());
|
||||
ScrollableWidget::scroll_into_view(rect, scroll_horizontally, scroll_vertically);
|
||||
}
|
||||
|
||||
void AbstractTableView::doubleclick_event(MouseEvent& event)
|
||||
{
|
||||
if (!model())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue