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

LibGUI: Simplify ListView hover highlighting

Instead of tracking the last valid hovered index, just hook the
mousemove event and make the cursor follow the hover when it changes.
This commit is contained in:
Andreas Kling 2020-09-02 21:21:24 +02:00
parent 274a09246b
commit 4ba12e9c23
5 changed files with 10 additions and 30 deletions

View file

@ -104,8 +104,6 @@ public:
NonnullRefPtr<Gfx::Font> font_for_index(const ModelIndex&) const;
void set_last_valid_hovered_index(const ModelIndex&);
void set_key_column_and_sort_order(int column, SortOrder);
int key_column() const { return m_key_column; }
@ -153,7 +151,6 @@ protected:
bool m_might_drag { false };
ModelIndex m_hovered_index;
ModelIndex m_last_valid_hovered_index;
int m_key_column { -1 };
SortOrder m_sort_order;