mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 07:27:45 +00:00
GSpinBox: Make the increment/decrement buttons unfocusable.
This commit is contained in:
parent
ff321d53ef
commit
41613e4303
1 changed files with 2 additions and 0 deletions
|
@ -16,9 +16,11 @@ GSpinBox::GSpinBox(GWidget* parent)
|
||||||
m_editor->set_text(String::format("%d", m_value));
|
m_editor->set_text(String::format("%d", m_value));
|
||||||
};
|
};
|
||||||
m_increment_button = new GButton(this);
|
m_increment_button = new GButton(this);
|
||||||
|
m_increment_button->set_focusable(false);
|
||||||
m_increment_button->set_text("\xf6");
|
m_increment_button->set_text("\xf6");
|
||||||
m_increment_button->on_click = [this](GButton&) { set_value(m_value + 1); };
|
m_increment_button->on_click = [this](GButton&) { set_value(m_value + 1); };
|
||||||
m_decrement_button = new GButton(this);
|
m_decrement_button = new GButton(this);
|
||||||
|
m_decrement_button->set_focusable(false);
|
||||||
m_decrement_button->set_text("\xf7");
|
m_decrement_button->set_text("\xf7");
|
||||||
m_decrement_button->on_click = [this](GButton&) { set_value(m_value - 1); };
|
m_decrement_button->on_click = [this](GButton&) { set_value(m_value - 1); };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue