2020-01-18 05:38:21 -03:00
|
|
|
/*
|
2020-02-26 08:02:25 -03:00
|
|
|
* Copyright (c) 2019-2020, Jesse Buhagiar <jooster669@gmail.com>
|
2021-05-18 17:21:56 -03:00
|
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
2021-11-20 12:28:46 -03:00
|
|
|
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
2020-01-18 05:38:21 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 05:38:21 -03:00
|
|
|
*/
|
|
|
|
|
|
2021-05-19 16:19:09 -03:00
|
|
|
#include "BackgroundSettingsWidget.h"
|
2021-06-30 14:28:16 -03:00
|
|
|
#include "DesktopSettingsWidget.h"
|
2021-05-21 13:55:30 -03:00
|
|
|
#include "FontSettingsWidget.h"
|
2021-05-19 16:43:54 -03:00
|
|
|
#include "MonitorSettingsWidget.h"
|
2021-08-29 11:05:41 -03:00
|
|
|
#include <LibConfig/Client.h>
|
2021-11-27 08:49:54 -03:00
|
|
|
#include <LibCore/System.h>
|
2020-02-06 16:33:02 -03:00
|
|
|
#include <LibGUI/Application.h>
|
2020-11-02 16:30:17 -03:00
|
|
|
#include <LibGUI/Icon.h>
|
2021-11-20 12:28:46 -03:00
|
|
|
#include <LibGUI/SettingsWindow.h>
|
2021-11-27 08:49:54 -03:00
|
|
|
#include <LibMain/Main.h>
|
2019-09-03 08:45:02 -03:00
|
|
|
|
2021-11-27 08:49:54 -03:00
|
|
|
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
2019-09-03 08:45:02 -03:00
|
|
|
{
|
2021-11-27 08:49:54 -03:00
|
|
|
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath cpath wpath unix"));
|
2020-01-13 08:22:49 -03:00
|
|
|
|
2021-11-27 08:49:54 -03:00
|
|
|
auto app = TRY(GUI::Application::try_create(arguments));
|
2021-08-29 11:05:41 -03:00
|
|
|
Config::pledge_domains("WindowManager");
|
2020-01-13 08:22:49 -03:00
|
|
|
|
2020-11-02 16:30:17 -03:00
|
|
|
auto app_icon = GUI::Icon::default_icon("app-display-settings");
|
|
|
|
|
|
2021-11-28 04:34:04 -03:00
|
|
|
auto window = TRY(GUI::SettingsWindow::create("Display Settings"));
|
2021-12-03 06:53:24 -03:00
|
|
|
(void)TRY(window->add_tab<DisplaySettings::BackgroundSettingsWidget>("Background"));
|
|
|
|
|
(void)TRY(window->add_tab<DisplaySettings::FontSettingsWidget>("Fonts"));
|
|
|
|
|
(void)TRY(window->add_tab<DisplaySettings::MonitorSettingsWidget>("Monitor"));
|
|
|
|
|
(void)TRY(window->add_tab<DisplaySettings::DesktopSettingsWidget>("Workspaces"));
|
2019-12-28 10:59:56 -03:00
|
|
|
|
2021-05-18 17:21:56 -03:00
|
|
|
window->set_icon(app_icon.bitmap_for_size(16));
|
2019-12-28 10:59:56 -03:00
|
|
|
|
2019-09-03 08:45:02 -03:00
|
|
|
window->show();
|
2020-07-04 09:05:19 -03:00
|
|
|
return app->exec();
|
2019-09-03 08:45:02 -03:00
|
|
|
}
|