mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:47:45 +00:00
PixelPaint: Implement automatic scrolling in LayerListWidget
The previous implementation of automatic scrolling in LayerListWidget relied on mousemove events to perform the scrolling, which didn't produce the expected behavior. Instead use the new auto scroll timer.
This commit is contained in:
parent
eec411c508
commit
dc9b18da22
2 changed files with 46 additions and 5 deletions
|
@ -45,6 +45,7 @@ private:
|
|||
virtual void image_did_modify_layer_properties(size_t) override;
|
||||
virtual void image_did_modify_layer_bitmap(size_t) override;
|
||||
virtual void image_did_modify_layer_stack() override;
|
||||
virtual void on_automatic_scrolling_timer_fired() override;
|
||||
|
||||
void rebuild_gadgets();
|
||||
void relayout_gadgets();
|
||||
|
@ -72,6 +73,8 @@ private:
|
|||
Optional<size_t> m_moving_gadget_index;
|
||||
Gfx::IntPoint m_moving_event_origin;
|
||||
|
||||
Gfx::IntPoint m_automatic_scroll_delta;
|
||||
|
||||
size_t m_selected_gadget_index { 0 };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue