1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:18:11 +00:00

LibGUI: Make sliders start a drag when jumping to the cursor

This allows users to seek to any position in VideoPlayer, then continue
adjusting the playback timestamp while holding left mouse.
This commit is contained in:
Zaggy1024 2023-02-05 18:35:22 -06:00 committed by Sam Atkins
parent 944191560a
commit fa98c43c0d
2 changed files with 32 additions and 15 deletions

View file

@ -44,8 +44,10 @@ protected:
explicit Slider(Orientation = Orientation::Vertical);
virtual void paint_event(PaintEvent&) override;
void start_drag(Gfx::IntPoint);
virtual void mousedown_event(MouseEvent&) override;
virtual void mousemove_event(MouseEvent&) override;
void end_drag();
virtual void mouseup_event(MouseEvent&) override;
virtual void mousewheel_event(MouseEvent&) override;
virtual void leave_event(Core::Event&) override;