LibGUI: Fix for disable state of SpinBox
This commit is contained in:
parent
532d4bc0ab
commit
f0f98de5d8
Notes:
sideshowbarker
2024-07-19 06:53:38 +09:00
Author: https://github.com/asliturk Commit: https://github.com/SerenityOS/serenity/commit/f0f98de5d81 Pull-request: https://github.com/SerenityOS/serenity/pull/2146
2 changed files with 11 additions and 0 deletions
|
@ -87,6 +87,15 @@ void SpinBox::set_range(int min, int max)
|
|||
update();
|
||||
}
|
||||
|
||||
void SpinBox::set_enabled(bool value)
|
||||
{
|
||||
Widget::set_enabled(value);
|
||||
|
||||
m_editor->set_enabled(value);
|
||||
m_increment_button->set_enabled(value);
|
||||
m_decrement_button->set_enabled(value);
|
||||
}
|
||||
|
||||
void SpinBox::keydown_event(KeyEvent& event)
|
||||
{
|
||||
if (event.key() == KeyCode::Key_Up) {
|
||||
|
|
|
@ -44,6 +44,8 @@ public:
|
|||
void set_max(int max) { set_range(min(), max); }
|
||||
void set_range(int min, int max);
|
||||
|
||||
void set_enabled(bool);
|
||||
|
||||
Function<void(int value)> on_change;
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Reference in a new issue