1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibGUI: Add DoClamp option to AbstractSlider::set_value()

This commit is contained in:
Itamar 2022-03-29 16:01:59 +03:00 committed by Andreas Kling
parent ab4c73746c
commit 1d522e4b4c
7 changed files with 17 additions and 11 deletions

View file

@ -142,9 +142,9 @@ int ValueSlider::value_at(const Gfx::IntPoint& position) const
return (int)(relative_offset * (float)max());
}
void ValueSlider::set_value(int value, AllowCallback allow_callback)
void ValueSlider::set_value(int value, AllowCallback allow_callback, DoClamp do_clamp)
{
AbstractSlider::set_value(value, allow_callback);
AbstractSlider::set_value(value, allow_callback, do_clamp);
m_textbox->set_text(formatted_value());
}