diff options
author | Itamar <itamar8910@gmail.com> | 2022-03-29 16:01:59 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-29 17:45:36 +0200 |
commit | 1d522e4b4ce27e1fe5ad42fc9f2538e0212442dd (patch) | |
tree | 7dbc7c5ea8c6187504de678ba76b6c4d64bc1259 /Userland/Applications/SoundPlayer | |
parent | ab4c73746c4ebe063e3d6a1533d97908b102dd35 (diff) | |
download | serenity-1d522e4b4ce27e1fe5ad42fc9f2538e0212442dd.zip |
LibGUI: Add DoClamp option to AbstractSlider::set_value()
Diffstat (limited to 'Userland/Applications/SoundPlayer')
-rw-r--r-- | Userland/Applications/SoundPlayer/Common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/SoundPlayer/Common.h b/Userland/Applications/SoundPlayer/Common.h index 203aecf56b..06c5309e2b 100644 --- a/Userland/Applications/SoundPlayer/Common.h +++ b/Userland/Applications/SoundPlayer/Common.h @@ -13,11 +13,11 @@ class AutoSlider final : public GUI::Slider { public: ~AutoSlider() override = default; Function<void(int)> on_knob_released; - virtual void set_value(int value, GUI::AllowCallback allow_callback = GUI::AllowCallback::Yes) override + virtual void set_value(int value, GUI::AllowCallback allow_callback = GUI::AllowCallback::Yes, DoClamp do_clamp = DoClamp::Yes) override { m_in_drag_value = value; if (!knob_dragging() && !mouse_is_down()) - GUI::Slider::set_value(value, allow_callback); + GUI::Slider::set_value(value, allow_callback, do_clamp); } bool mouse_is_down() const { return m_mouse_is_down; } |