summaryrefslogtreecommitdiff
path: root/Userland/Applications/DisplaySettings
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications/DisplaySettings')
-rw-r--r--Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp6
-rw-r--r--Userland/Applications/DisplaySettings/DesktopSettingsWidget.cpp2
-rw-r--r--Userland/Applications/DisplaySettings/MonitorSettingsWidget.cpp8
-rw-r--r--Userland/Applications/DisplaySettings/MonitorWidget.cpp2
-rw-r--r--Userland/Applications/DisplaySettings/ThemePreviewWidget.cpp8
-rw-r--r--Userland/Applications/DisplaySettings/ThemesSettingsWidget.cpp4
-rw-r--r--Userland/Applications/DisplaySettings/main.cpp12
7 files changed, 21 insertions, 21 deletions
diff --git a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp
index 1a02a50ef2..d0a47a3f5b 100644
--- a/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp
+++ b/Userland/Applications/DisplaySettings/BackgroundSettingsWidget.cpp
@@ -65,7 +65,7 @@ void BackgroundSettingsWidget::create_frame()
};
m_context_menu = GUI::Menu::construct();
- m_show_in_file_manager_action = GUI::Action::create("Show in File Manager", Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-file-manager.png").release_value_but_fixme_should_propagate_errors(), [this](GUI::Action const&) {
+ m_show_in_file_manager_action = GUI::Action::create("Show in File Manager", Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-file-manager.png"sv).release_value_but_fixme_should_propagate_errors(), [this](GUI::Action const&) {
LexicalPath path { m_monitor_widget->wallpaper() };
Desktop::Launcher::open(URL::create_with_file_protocol(path.dirname(), path.basename()));
});
@@ -88,7 +88,7 @@ void BackgroundSettingsWidget::create_frame()
auto& button = *find_descendant_of_type_named<GUI::Button>("wallpaper_open_button");
button.on_click = [this](auto) {
- auto path = GUI::FilePicker::get_open_filepath(window(), "Select wallpaper from file system", "/res/wallpapers");
+ auto path = GUI::FilePicker::get_open_filepath(window(), "Select wallpaper from file system", "/res/wallpapers"sv);
if (!path.has_value())
return;
m_wallpaper_view->selection().clear();
@@ -124,7 +124,7 @@ void BackgroundSettingsWidget::load_current_settings()
{
auto ws_config = Core::ConfigFile::open("/etc/WindowServer.ini").release_value_but_fixme_should_propagate_errors();
- auto selected_wallpaper = Config::read_string("WindowManager", "Background", "Wallpaper", "");
+ auto selected_wallpaper = Config::read_string("WindowManager"sv, "Background"sv, "Wallpaper"sv, ""sv);
if (!selected_wallpaper.is_empty()) {
auto index = static_cast<GUI::FileSystemModel*>(m_wallpaper_view->model())->index(selected_wallpaper, m_wallpaper_view->model_column());
m_wallpaper_view->set_cursor(index, GUI::AbstractView::SelectionUpdate::Set);
diff --git a/Userland/Applications/DisplaySettings/DesktopSettingsWidget.cpp b/Userland/Applications/DisplaySettings/DesktopSettingsWidget.cpp
index ba38f72e4a..2c2901ffff 100644
--- a/Userland/Applications/DisplaySettings/DesktopSettingsWidget.cpp
+++ b/Userland/Applications/DisplaySettings/DesktopSettingsWidget.cpp
@@ -50,7 +50,7 @@ void DesktopSettingsWidget::apply_settings()
if (workspace_rows != desktop.workspace_rows() || workspace_columns != desktop.workspace_columns()) {
if (!GUI::ConnectionToWindowServer::the().apply_workspace_settings(workspace_rows, workspace_columns, true)) {
GUI::MessageBox::show(window(), String::formatted("Error applying workspace settings"),
- "Workspace settings", GUI::MessageBox::Type::Error);
+ "Workspace settings"sv, GUI::MessageBox::Type::Error);
}
}
}
diff --git a/Userland/Applications/DisplaySettings/MonitorSettingsWidget.cpp b/Userland/Applications/DisplaySettings/MonitorSettingsWidget.cpp
index d5049e4084..5bdf07ec9e 100644
--- a/Userland/Applications/DisplaySettings/MonitorSettingsWidget.cpp
+++ b/Userland/Applications/DisplaySettings/MonitorSettingsWidget.cpp
@@ -239,7 +239,7 @@ void MonitorSettingsWidget::apply_settings()
seconds_until_revert, seconds_until_revert == 1 ? "second" : "seconds");
};
- auto box = GUI::MessageBox::construct(window(), box_text(), "Apply new screen layout",
+ auto box = GUI::MessageBox::construct(window(), box_text(), "Apply new screen layout"sv,
GUI::MessageBox::Type::Question, GUI::MessageBox::InputType::YesNo);
box->set_icon(window()->icon());
@@ -258,20 +258,20 @@ void MonitorSettingsWidget::apply_settings()
auto save_result = GUI::ConnectionToWindowServer::the().save_screen_layout();
if (!save_result.success()) {
GUI::MessageBox::show(window(), String::formatted("Error saving settings: {}", save_result.error_msg()),
- "Unable to save setting", GUI::MessageBox::Type::Error);
+ "Unable to save setting"sv, GUI::MessageBox::Type::Error);
}
} else {
auto restore_result = GUI::ConnectionToWindowServer::the().set_screen_layout(current_layout, false);
if (!restore_result.success()) {
GUI::MessageBox::show(window(), String::formatted("Error restoring settings: {}", restore_result.error_msg()),
- "Unable to restore setting", GUI::MessageBox::Type::Error);
+ "Unable to restore setting"sv, GUI::MessageBox::Type::Error);
} else {
load_current_settings();
}
}
} else {
GUI::MessageBox::show(window(), String::formatted("Error setting screen layout: {}", result.error_msg()),
- "Unable to apply changes", GUI::MessageBox::Type::Error);
+ "Unable to apply changes"sv, GUI::MessageBox::Type::Error);
}
}
}
diff --git a/Userland/Applications/DisplaySettings/MonitorWidget.cpp b/Userland/Applications/DisplaySettings/MonitorWidget.cpp
index cb56366ebd..0bf92e337b 100644
--- a/Userland/Applications/DisplaySettings/MonitorWidget.cpp
+++ b/Userland/Applications/DisplaySettings/MonitorWidget.cpp
@@ -19,7 +19,7 @@ namespace DisplaySettings {
MonitorWidget::MonitorWidget()
{
m_desktop_resolution = GUI::Desktop::the().rect().size();
- m_monitor_bitmap = Gfx::Bitmap::try_load_from_file("/res/graphics/monitor.png").release_value_but_fixme_should_propagate_errors();
+ m_monitor_bitmap = Gfx::Bitmap::try_load_from_file("/res/graphics/monitor.png"sv).release_value_but_fixme_should_propagate_errors();
m_desktop_bitmap = Gfx::Bitmap::try_create(m_monitor_bitmap->format(), { 280, 158 }).release_value_but_fixme_should_propagate_errors();
m_monitor_rect = { { 12, 13 }, m_desktop_bitmap->size() };
set_fixed_size(304, 201);
diff --git a/Userland/Applications/DisplaySettings/ThemePreviewWidget.cpp b/Userland/Applications/DisplaySettings/ThemePreviewWidget.cpp
index 6e4bb77e1b..d4593abad8 100644
--- a/Userland/Applications/DisplaySettings/ThemePreviewWidget.cpp
+++ b/Userland/Applications/DisplaySettings/ThemePreviewWidget.cpp
@@ -39,9 +39,9 @@ void ThemePreviewWidget::paint_preview(GUI::PaintEvent&)
};
center_window_group_within(window_group, frame_inner_rect());
- paint_window("Inactive Window", inactive_window_rect, Gfx::WindowTheme::WindowState::Inactive, inactive_window_icon());
- paint_window("Active Window", active_window_rect, Gfx::WindowTheme::WindowState::Active, active_window_icon());
- paint_window("Alert", message_box, Gfx::WindowTheme::WindowState::Highlighted, active_window_icon(), 1);
+ paint_window("Inactive Window"sv, inactive_window_rect, Gfx::WindowTheme::WindowState::Inactive, inactive_window_icon());
+ paint_window("Active Window"sv, active_window_rect, Gfx::WindowTheme::WindowState::Active, active_window_icon());
+ paint_window("Alert"sv, message_box, Gfx::WindowTheme::WindowState::Highlighted, active_window_icon(), 1);
auto draw_centered_button = [&](auto window_rect, auto text, int button_width, int button_height) {
Gfx::IntRect button_rect { 0, 0, button_width, button_height };
@@ -50,7 +50,7 @@ void ThemePreviewWidget::paint_preview(GUI::PaintEvent&)
painter.draw_text(button_rect, text, Gfx::TextAlignment::Center, preview_palette().color(foreground_role()), Gfx::TextElision::Right, Gfx::TextWrapping::DontWrap);
};
- draw_centered_button(message_box, "Ok", 32, 16);
+ draw_centered_button(message_box, "Ok"sv, 32, 16);
}
}
diff --git a/Userland/Applications/DisplaySettings/ThemesSettingsWidget.cpp b/Userland/Applications/DisplaySettings/ThemesSettingsWidget.cpp
index e2e9848dfe..36c4774242 100644
--- a/Userland/Applications/DisplaySettings/ThemesSettingsWidget.cpp
+++ b/Userland/Applications/DisplaySettings/ThemesSettingsWidget.cpp
@@ -45,11 +45,11 @@ ThemesSettingsWidget::ThemesSettingsWidget(bool& background_settings_changed)
};
m_themes_combo->set_selected_index(current_theme_index, GUI::AllowCallback::No);
- auto mouse_settings_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-mouse.png").release_value_but_fixme_should_propagate_errors();
+ auto mouse_settings_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-mouse.png"sv).release_value_but_fixme_should_propagate_errors();
m_cursor_themes_button = *find_descendant_of_type_named<GUI::Button>("cursor_themes_button");
m_cursor_themes_button->set_icon(mouse_settings_icon);
m_cursor_themes_button->on_click = [&](auto) {
- GUI::Process::spawn_or_show_error(window(), "/bin/MouseSettings", Array { "-t", "cursor-theme" });
+ GUI::Process::spawn_or_show_error(window(), "/bin/MouseSettings"sv, Array { "-t", "cursor-theme" });
};
GUI::Application::the()->on_theme_change = [&]() {
diff --git a/Userland/Applications/DisplaySettings/main.cpp b/Userland/Applications/DisplaySettings/main.cpp
index 2b83b5f5c5..0794fd41ea 100644
--- a/Userland/Applications/DisplaySettings/main.cpp
+++ b/Userland/Applications/DisplaySettings/main.cpp
@@ -31,16 +31,16 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.add_option(selected_tab, "Tab, one of 'background', 'fonts', 'monitor', 'themes', or 'workspaces'", "open-tab", 't', "tab");
args_parser.parse(arguments);
- auto app_icon = GUI::Icon::default_icon("app-display-settings");
+ auto app_icon = GUI::Icon::default_icon("app-display-settings"sv);
bool background_settings_changed = false;
auto window = TRY(GUI::SettingsWindow::create("Display Settings"));
- (void)TRY(window->add_tab<DisplaySettings::BackgroundSettingsWidget>("Background", "background", background_settings_changed));
- (void)TRY(window->add_tab<DisplaySettings::ThemesSettingsWidget>("Themes", "themes", background_settings_changed));
- (void)TRY(window->add_tab<DisplaySettings::FontSettingsWidget>("Fonts", "fonts"));
- (void)TRY(window->add_tab<DisplaySettings::MonitorSettingsWidget>("Monitor", "monitor"));
- (void)TRY(window->add_tab<DisplaySettings::DesktopSettingsWidget>("Workspaces", "workspaces"));
+ (void)TRY(window->add_tab<DisplaySettings::BackgroundSettingsWidget>("Background"sv, "background"sv, background_settings_changed));
+ (void)TRY(window->add_tab<DisplaySettings::ThemesSettingsWidget>("Themes"sv, "themes"sv, background_settings_changed));
+ (void)TRY(window->add_tab<DisplaySettings::FontSettingsWidget>("Fonts"sv, "fonts"sv));
+ (void)TRY(window->add_tab<DisplaySettings::MonitorSettingsWidget>("Monitor"sv, "monitor"sv));
+ (void)TRY(window->add_tab<DisplaySettings::DesktopSettingsWidget>("Workspaces"sv, "workspaces"sv));
window->set_active_tab(selected_tab);
window->set_icon(app_icon.bitmap_for_size(16));