summaryrefslogtreecommitdiff
path: root/Applications/Terminal
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-23 10:57:42 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-23 11:10:52 +0100
commit3d20da9ee451460b6e233f5efdf5a13e11525f97 (patch)
tree524b72d0874304c68036dbbc0514b632a4a08c59 /Applications/Terminal
parent7ec758773cdd85755d91f52614f361e7e750c7e9 (diff)
downloadserenity-3d20da9ee451460b6e233f5efdf5a13e11525f97.zip
Userspace: Use Core::Object::add() when building interfaces
Diffstat (limited to 'Applications/Terminal')
-rw-r--r--Applications/Terminal/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Applications/Terminal/main.cpp b/Applications/Terminal/main.cpp
index 8241e8070c..b20830c994 100644
--- a/Applications/Terminal/main.cpp
+++ b/Applications/Terminal/main.cpp
@@ -140,26 +140,26 @@ RefPtr<GUI::Window> create_settings_window(TerminalWidget& terminal)
settings->set_layout(make<GUI::VerticalBoxLayout>());
settings->layout()->set_margins({ 4, 4, 4, 4 });
- auto radio_container = GUI::GroupBox::construct("Bell Mode", settings);
+ auto radio_container = settings->add<GUI::GroupBox>("Bell Mode");
radio_container->set_layout(make<GUI::VerticalBoxLayout>());
radio_container->layout()->set_margins({ 6, 16, 6, 6 });
radio_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
radio_container->set_preferred_size(100, 70);
- auto sysbell_radio = GUI::RadioButton::construct("Use (Audible) System Bell", radio_container);
- auto visbell_radio = GUI::RadioButton::construct("Use (Visual) Terminal Bell", radio_container);
+ auto sysbell_radio = radio_container->add<GUI::RadioButton>("Use (Audible) System Bell");
+ auto visbell_radio = radio_container->add<GUI::RadioButton>("Use (Visual) Terminal Bell");
sysbell_radio->set_checked(terminal.should_beep());
visbell_radio->set_checked(!terminal.should_beep());
sysbell_radio->on_checked = [&terminal](const bool checked) {
terminal.set_should_beep(checked);
};
- auto slider_container = GUI::GroupBox::construct("Background Opacity", settings);
+ auto slider_container = settings->add<GUI::GroupBox>("Background Opacity");
slider_container->set_layout(make<GUI::VerticalBoxLayout>());
slider_container->layout()->set_margins({ 6, 16, 6, 6 });
slider_container->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
slider_container->set_preferred_size(100, 50);
- auto slider = GUI::HorizontalSlider::construct(slider_container);
+ auto slider = slider_container->add<GUI::HorizontalSlider>();
slider->on_value_changed = [&terminal](int value) {
terminal.set_opacity(value);