mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibGUI: Add option to disable on_change call for sliders set_value()
This makes it possible to avoid messy situations where a slider controlled value can be changed from multiple sources.
This commit is contained in:
parent
5a91f5b320
commit
3c8493c667
Notes:
sideshowbarker
2024-07-18 03:39:17 +09:00
Author: https://github.com/Granddave
Commit: 3c8493c667
Pull-request: https://github.com/SerenityOS/serenity/pull/10119
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
5 changed files with 12 additions and 6 deletions
|
@ -141,9 +141,9 @@ int ValueSlider::value_at(const Gfx::IntPoint& position) const
|
|||
return (int)(relative_offset * (float)max());
|
||||
}
|
||||
|
||||
void ValueSlider::set_value(int value)
|
||||
void ValueSlider::set_value(int value, CallOnChange call_on_change)
|
||||
{
|
||||
AbstractSlider::set_value(value);
|
||||
AbstractSlider::set_value(value, call_on_change);
|
||||
m_textbox->set_text(formatted_value());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue