diff options
author | networkException <git@nwex.de> | 2022-09-06 18:18:23 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-09-06 17:37:44 +0100 |
commit | 5b46d16b4ddd142f4fe995dd595329408ee779ff (patch) | |
tree | 29ded4705a7522e6b088dac727e51dd3812c8cd2 /Userland | |
parent | 43f87c67f2a2d55f0b4dc8b088ef0882270e0c57 (diff) | |
download | serenity-5b46d16b4ddd142f4fe995dd595329408ee779ff.zip |
LibGUI: Update {in,de}crement buttons when setting a new spin box range
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGUI/SpinBox.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/SpinBox.cpp b/Userland/Libraries/LibGUI/SpinBox.cpp index 48e2a1f95a..a2acc9ffc1 100644 --- a/Userland/Libraries/LibGUI/SpinBox.cpp +++ b/Userland/Libraries/LibGUI/SpinBox.cpp @@ -96,6 +96,9 @@ void SpinBox::set_range(int min, int max, AllowCallback allow_callback) on_change(m_value); } + m_increment_button->set_enabled(m_value < m_max); + m_decrement_button->set_enabled(m_value > m_min); + update(); } |