summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-29 19:31:15 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-29 19:31:15 +0200
commit9f32d71782bcc6afa4c86a2e2664b0c437c2575f (patch)
treedae68abb52b9e5a14b508b76540541ea8a6a8854 /Libraries
parent77916f030f588ce1ec33b455bf85362b9f21eaf4 (diff)
downloadserenity-9f32d71782bcc6afa4c86a2e2664b0c437c2575f.zip
LibGUI: Use "OK, Cancel" button order in InputBox
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibGUI/InputBox.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Libraries/LibGUI/InputBox.cpp b/Libraries/LibGUI/InputBox.cpp
index a38fe8396b..9d6025f4e4 100644
--- a/Libraries/LibGUI/InputBox.cpp
+++ b/Libraries/LibGUI/InputBox.cpp
@@ -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();
};