summaryrefslogtreecommitdiff
path: root/Userland/Applications/SoundPlayer
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2022-03-29 16:01:59 +0300
committerAndreas Kling <kling@serenityos.org>2022-03-29 17:45:36 +0200
commit1d522e4b4ce27e1fe5ad42fc9f2538e0212442dd (patch)
tree7dbc7c5ea8c6187504de678ba76b6c4d64bc1259 /Userland/Applications/SoundPlayer
parentab4c73746c4ebe063e3d6a1533d97908b102dd35 (diff)
downloadserenity-1d522e4b4ce27e1fe5ad42fc9f2538e0212442dd.zip
LibGUI: Add DoClamp option to AbstractSlider::set_value()
Diffstat (limited to 'Userland/Applications/SoundPlayer')
-rw-r--r--Userland/Applications/SoundPlayer/Common.h4
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; }