mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37:43 +00:00
LibGUI: Add DoClamp option to AbstractSlider::set_value()
This commit is contained in:
parent
ab4c73746c
commit
1d522e4b4c
7 changed files with 17 additions and 11 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue