mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibGUI: Use ControlBoxButtons in SpinBox and ComboBox
Converts the buttons of these widgets into ControlBoxButtons.
This commit is contained in:
committed by
Andreas Kling
parent
bf59cd7ca5
commit
c90fe7ce93
@@ -24,7 +24,7 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibGUI/Button.h>
|
||||
#include <LibGUI/ControlBoxButton.h>
|
||||
#include <LibGUI/SpinBox.h>
|
||||
#include <LibGUI/TextBox.h>
|
||||
|
||||
@@ -41,14 +41,13 @@ SpinBox::SpinBox()
|
||||
else
|
||||
m_editor->set_text(String::number(m_value));
|
||||
};
|
||||
m_increment_button = add<Button>();
|
||||
|
||||
m_increment_button = add<ControlBoxButton>(ControlBoxButton::UpArrow);
|
||||
m_increment_button->set_focusable(false);
|
||||
m_increment_button->set_text("\xE2\xAC\x86"); // UPWARDS BLACK ARROW
|
||||
m_increment_button->on_click = [this](auto) { set_value(m_value + 1); };
|
||||
m_increment_button->set_auto_repeat_interval(150);
|
||||
m_decrement_button = add<Button>();
|
||||
m_decrement_button = add<ControlBoxButton>(ControlBoxButton::DownArrow);
|
||||
m_decrement_button->set_focusable(false);
|
||||
m_decrement_button->set_text("\xE2\xAC\x87"); // DOWNWARDS BLACK ARROW
|
||||
m_decrement_button->on_click = [this](auto) { set_value(m_value - 1); };
|
||||
m_decrement_button->set_auto_repeat_interval(150);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user