1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

LibGUI: Add GItemView::index_at_event_position()

This replaces GItemView::item_at_event_position(), which used to return a raw
int, requiring callers to call model()->index() with it again.
This commit is contained in:
Sergey Bugaev 2020-01-22 18:09:12 +03:00 committed by Andreas Kling
parent 2ccad40a16
commit ff66101f9e
2 changed files with 12 additions and 15 deletions

View file

@ -64,7 +64,7 @@ private:
int item_count() const;
Rect item_rect(int item_index) const;
int item_at_event_position(const Point&) const;
GModelIndex index_at_event_position(const Point&) const;
Vector<int> items_intersecting_rect(const Rect&) const;
void update_content_size();
void get_item_rects(int item_index, const Font&, const GVariant& item_text, Rect& item_rect, Rect& icon_rect, Rect& text_rect) const;