mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibGUI: Implement the virtual IconView::scroll_into_view()
This is virtual in AbstractView so let's not shadow it with an IconView specific variant.
This commit is contained in:
parent
72443bd1ab
commit
27e86c03da
Notes:
sideshowbarker
2024-07-19 02:57:02 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/27e86c03da6
2 changed files with 6 additions and 3 deletions
|
@ -62,9 +62,11 @@ void IconView::select_all()
|
|||
}
|
||||
}
|
||||
|
||||
void IconView::scroll_into_view(const ModelIndex& index, Orientation orientation)
|
||||
void IconView::scroll_into_view(const ModelIndex& index, bool scroll_horizontally, bool scroll_vertically)
|
||||
{
|
||||
ScrollableWidget::scroll_into_view(item_rect(index.row()), orientation);
|
||||
if (!index.is_valid())
|
||||
return;
|
||||
ScrollableWidget::scroll_into_view(item_rect(index.row()), scroll_horizontally, scroll_vertically);
|
||||
}
|
||||
|
||||
void IconView::resize_event(ResizeEvent& event)
|
||||
|
|
|
@ -41,7 +41,8 @@ public:
|
|||
int content_width() const;
|
||||
int horizontal_padding() const { return m_horizontal_padding; }
|
||||
|
||||
void scroll_into_view(const ModelIndex&, Orientation);
|
||||
virtual void scroll_into_view(const ModelIndex&, bool scroll_horizontally = true, bool scroll_vertically = true) override;
|
||||
|
||||
Gfx::IntSize effective_item_size() const { return m_effective_item_size; }
|
||||
|
||||
int model_column() const { return m_model_column; }
|
||||
|
|
Loading…
Reference in a new issue