mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 17:15:26 +00:00
LibGUI: Use "OK, Cancel" button order in InputBox
This commit is contained in:
@@ -79,15 +79,6 @@ void InputBox::build()
|
||||
button_container_inner.set_layout<HorizontalBoxLayout>();
|
||||
button_container_inner.layout()->set_spacing(8);
|
||||
|
||||
m_cancel_button = button_container_inner.add<Button>();
|
||||
m_cancel_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
||||
m_cancel_button->set_preferred_size(0, 20);
|
||||
m_cancel_button->set_text("Cancel");
|
||||
m_cancel_button->on_click = [this] {
|
||||
dbgprintf("GUI::InputBox: Cancel button clicked\n");
|
||||
done(ExecCancel);
|
||||
};
|
||||
|
||||
m_ok_button = button_container_inner.add<Button>();
|
||||
m_ok_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
||||
m_ok_button->set_preferred_size(0, 20);
|
||||
@@ -98,6 +89,15 @@ void InputBox::build()
|
||||
done(ExecOK);
|
||||
};
|
||||
|
||||
m_cancel_button = button_container_inner.add<Button>();
|
||||
m_cancel_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
||||
m_cancel_button->set_preferred_size(0, 20);
|
||||
m_cancel_button->set_text("Cancel");
|
||||
m_cancel_button->on_click = [this] {
|
||||
dbgprintf("GUI::InputBox: Cancel button clicked\n");
|
||||
done(ExecCancel);
|
||||
};
|
||||
|
||||
m_text_editor->on_return_pressed = [this] {
|
||||
m_ok_button->click();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user