1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-17 23:52:07 +00:00

GSpinBox: Make the increment/decrement buttons unfocusable.

This commit is contained in:
Andreas Kling 2019-06-22 11:16:41 +02:00
parent ff321d53ef
commit 41613e4303

View file

@ -16,9 +16,11 @@ GSpinBox::GSpinBox(GWidget* parent)
m_editor->set_text(String::format("%d", m_value));
};
m_increment_button = new GButton(this);
m_increment_button->set_focusable(false);
m_increment_button->set_text("\xf6");
m_increment_button->on_click = [this](GButton&) { set_value(m_value + 1); };
m_decrement_button = new GButton(this);
m_decrement_button->set_focusable(false);
m_decrement_button->set_text("\xf7");
m_decrement_button->on_click = [this](GButton&) { set_value(m_value - 1); };
}