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