mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +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
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)
|
void IconView::resize_event(ResizeEvent& event)
|
||||||
|
|
|
@ -41,7 +41,8 @@ public:
|
||||||
int content_width() const;
|
int content_width() const;
|
||||||
int horizontal_padding() const { return m_horizontal_padding; }
|
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; }
|
Gfx::IntSize effective_item_size() const { return m_effective_item_size; }
|
||||||
|
|
||||||
int model_column() const { return m_model_column; }
|
int model_column() const { return m_model_column; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue