mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibGUI: Add DoClamp option to AbstractSlider::set_value()
This commit is contained in:
parent
ab4c73746c
commit
1d522e4b4c
Notes:
sideshowbarker
2024-07-17 16:34:15 +09:00
Author: https://github.com/itamar8910
Commit: 1d522e4b4c
Pull-request: https://github.com/SerenityOS/serenity/pull/13335
Reviewed-by: https://github.com/alimpfard ✅
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