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