mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:08:13 +00:00
LibGUI: Move GUI::SettingsWindow setup out of the constructor
In order to propagate errors that occur during UI setup, we have to move all that logic out of widget/window subclass constructors. This is a first attempt at doing that, for GUI::SettingsWindow.
This commit is contained in:
parent
56c4f0aff5
commit
60c132d7d3
8 changed files with 48 additions and 38 deletions
|
@ -26,7 +26,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto app_icon = GUI::Icon::default_icon("app-display-settings");
|
||||
|
||||
auto window = TRY(GUI::SettingsWindow::try_create("Display Settings"));
|
||||
auto window = TRY(GUI::SettingsWindow::create("Display Settings"));
|
||||
TRY(window->add_tab<DisplaySettings::BackgroundSettingsWidget>("Background"));
|
||||
TRY(window->add_tab<DisplaySettings::FontSettingsWidget>("Fonts"));
|
||||
TRY(window->add_tab<DisplaySettings::MonitorSettingsWidget>("Monitor"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue