diff options
author | ForLoveOfCats <floc@unpromptedtirade.com> | 2022-03-07 14:19:35 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-07 22:24:24 +0100 |
commit | c204885a94cf158b009befc32bab61deef4ab452 (patch) | |
tree | 412d43da680249a4ec29e4e7163fb6c5e4202c09 /Userland/Libraries/LibGUI/AbstractSlider.h | |
parent | 86c0961240ac23b8a7c42472b7c8b2ae2e5d2f69 (diff) | |
download | serenity-c204885a94cf158b009befc32bab61deef4ab452.zip |
LibGUI: Animated smooth scroll interpolation
Diffstat (limited to 'Userland/Libraries/LibGUI/AbstractSlider.h')
-rw-r--r-- | Userland/Libraries/LibGUI/AbstractSlider.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibGUI/AbstractSlider.h b/Userland/Libraries/LibGUI/AbstractSlider.h index 7d22aa7cc3..10e3fc829d 100644 --- a/Userland/Libraries/LibGUI/AbstractSlider.h +++ b/Userland/Libraries/LibGUI/AbstractSlider.h @@ -38,12 +38,12 @@ public: void set_page_step(int page_step); void set_jump_to_cursor(bool b) { m_jump_to_cursor = b; } - void increase_slider_by(int delta) { set_value(value() + delta); } - void decrease_slider_by(int delta) { set_value(value() - delta); } - void increase_slider_by_page_steps(int page_steps) { set_value(value() + page_step() * page_steps); } - void decrease_slider_by_page_steps(int page_steps) { set_value(value() - page_step() * page_steps); } - void increase_slider_by_steps(int steps) { set_value(value() + step() * steps); } - void decrease_slider_by_steps(int steps) { set_value(value() - step() * steps); } + virtual void increase_slider_by(int delta) { set_value(value() + delta); } + virtual void decrease_slider_by(int delta) { set_value(value() - delta); } + virtual void increase_slider_by_page_steps(int page_steps) { set_value(value() + page_step() * page_steps); } + virtual void decrease_slider_by_page_steps(int page_steps) { set_value(value() - page_step() * page_steps); } + virtual void increase_slider_by_steps(int steps) { set_value(value() + step() * steps); } + virtual void decrease_slider_by_steps(int steps) { set_value(value() - step() * steps); } Function<void(int)> on_change; |