mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-30 14:20:21 +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
|
@ -30,7 +30,12 @@ public:
|
|||
bool is_max() const { return m_value == m_max; }
|
||||
|
||||
void set_range(int min, int max);
|
||||
virtual void set_value(int, AllowCallback = AllowCallback::Yes);
|
||||
|
||||
enum class DoClamp {
|
||||
Yes = 1,
|
||||
No = 0
|
||||
};
|
||||
virtual void set_value(int, AllowCallback = AllowCallback::Yes, DoClamp = DoClamp::Yes);
|
||||
|
||||
void set_min(int min) { set_range(min, max()); }
|
||||
void set_max(int max) { set_range(min(), max); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue