mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibGUI: Implement automatic scrolling in AbstractView
This adds automatic scrolling when dragging items in TreeViews and other widgets that inherit from AbstractView when the overloaded accepts_drag() returns true. This is implemented in FileSystemModel to allow directories and files to be dragged.
This commit is contained in:
parent
53cfc6ec9f
commit
d660e86d13
Notes:
sideshowbarker
2024-07-18 03:19:50 +09:00
Author: https://github.com/metmo
Commit: d660e86d13
Pull-request: https://github.com/SerenityOS/serenity/pull/10150
6 changed files with 45 additions and 7 deletions
|
@ -142,6 +142,8 @@ protected:
|
|||
virtual void hide_event(HideEvent&) override;
|
||||
virtual void focusin_event(FocusEvent&) override;
|
||||
|
||||
virtual void on_automatic_scrolling_timer_fired() override;
|
||||
|
||||
virtual void clear_selection();
|
||||
virtual void set_selection(ModelIndex const&);
|
||||
virtual void set_selection_start_index(ModelIndex const&);
|
||||
|
@ -202,6 +204,8 @@ private:
|
|||
bool m_is_dragging { false };
|
||||
bool m_draw_item_text_with_shadow { false };
|
||||
bool m_suppress_update_on_selection_change { false };
|
||||
|
||||
Gfx::IntPoint m_automatic_scroll_delta {};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue