diff options
author | Linus Groh <mail@linusgroh.de> | 2023-02-25 16:40:37 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-25 20:51:49 +0100 |
commit | 09d40bfbb24588b5659f17e2701b5c367a447110 (patch) | |
tree | 8a5612e3251e504ab41d0ff5c7a1a7f70c2593b0 /Userland/Applications | |
parent | 85414d9338f5b4a25f46f519c07af161c48af45d (diff) | |
download | serenity-09d40bfbb24588b5659f17e2701b5c367a447110.zip |
Everywhere: Use _{short_,}string to create Strings from literals
Diffstat (limited to 'Userland/Applications')
33 files changed, 77 insertions, 77 deletions
diff --git a/Userland/Applications/Browser/DownloadWidget.cpp b/Userland/Applications/Browser/DownloadWidget.cpp index 5155b9e596..ac6cfa313f 100644 --- a/Userland/Applications/Browser/DownloadWidget.cpp +++ b/Userland/Applications/Browser/DownloadWidget.cpp @@ -84,7 +84,7 @@ DownloadWidget::DownloadWidget(const URL& url) destination_label.set_text_alignment(Gfx::TextAlignment::CenterLeft); destination_label.set_fixed_height(16); - m_close_on_finish_checkbox = add<GUI::CheckBox>(String::from_utf8("Close when finished"sv).release_value_but_fixme_should_propagate_errors()); + m_close_on_finish_checkbox = add<GUI::CheckBox>("Close when finished"_string.release_value_but_fixme_should_propagate_errors()); m_close_on_finish_checkbox->set_checked(close_on_finish); m_close_on_finish_checkbox->on_checked = [&](bool checked) { @@ -94,7 +94,7 @@ DownloadWidget::DownloadWidget(const URL& url) auto& button_container = add<GUI::Widget>(); button_container.set_layout<GUI::HorizontalBoxLayout>(); button_container.add_spacer().release_value_but_fixme_should_propagate_errors(); - m_cancel_button = button_container.add<GUI::Button>(String::from_utf8_short_string("Cancel"sv)); + m_cancel_button = button_container.add<GUI::Button>("Cancel"_short_string); m_cancel_button->set_fixed_size(100, 22); m_cancel_button->on_click = [this](auto) { bool success = m_download->stop(); @@ -102,7 +102,7 @@ DownloadWidget::DownloadWidget(const URL& url) window()->close(); }; - m_close_button = button_container.add<GUI::Button>(String::from_utf8_short_string("OK"sv)); + m_close_button = button_container.add<GUI::Button>("OK"_short_string); m_close_button->set_enabled(false); m_close_button->set_fixed_size(100, 22); m_close_button->on_click = [this](auto) { @@ -151,7 +151,7 @@ void DownloadWidget::did_finish(bool success) m_browser_image->load_from_file("/res/graphics/download-finished.gif"sv); window()->set_title("Download finished!"); m_close_button->set_enabled(true); - m_cancel_button->set_text(String::from_utf8("Open in Folder"sv).release_value_but_fixme_should_propagate_errors()); + m_cancel_button->set_text("Open in Folder"_string.release_value_but_fixme_should_propagate_errors()); m_cancel_button->on_click = [this](auto) { Desktop::Launcher::open(URL::create_with_file_scheme(Core::StandardPaths::downloads_directory(), m_url.basename())); window()->close(); diff --git a/Userland/Applications/Calculator/RoundingDialog.cpp b/Userland/Applications/Calculator/RoundingDialog.cpp index 759c17c5e2..9f9e49e709 100644 --- a/Userland/Applications/Calculator/RoundingDialog.cpp +++ b/Userland/Applications/Calculator/RoundingDialog.cpp @@ -46,8 +46,8 @@ RoundingDialog::RoundingDialog(GUI::Window* parent_window, StringView title) m_rounding_spinbox = GUI::SpinBox::construct(); m_buttons_container = GUI::Widget::construct(); - m_ok_button = GUI::DialogButton::construct(String::from_utf8_short_string("OK"sv)); - m_cancel_button = GUI::DialogButton::construct(String::from_utf8_short_string("Cancel"sv)); + m_ok_button = GUI::DialogButton::construct("OK"_short_string); + m_cancel_button = GUI::DialogButton::construct("Cancel"_short_string); main_widget->add_child(*m_rounding_spinbox); main_widget->add_child(*m_buttons_container); diff --git a/Userland/Applications/Calendar/AddEventDialog.cpp b/Userland/Applications/Calendar/AddEventDialog.cpp index 2e02f94098..3be8ec5aa7 100644 --- a/Userland/Applications/Calendar/AddEventDialog.cpp +++ b/Userland/Applications/Calendar/AddEventDialog.cpp @@ -90,7 +90,7 @@ AddEventDialog::AddEventDialog(Core::DateTime date_time, Window* parent_window) button_container.set_fixed_height(20); button_container.set_layout<GUI::HorizontalBoxLayout>(); button_container.add_spacer().release_value_but_fixme_should_propagate_errors(); - auto& ok_button = button_container.add<GUI::Button>(String::from_utf8_short_string("OK"sv)); + auto& ok_button = button_container.add<GUI::Button>("OK"_short_string); ok_button.set_fixed_size(80, 20); ok_button.on_click = [this](auto) { dbgln("TODO: Add event icon on specific tile"); diff --git a/Userland/Applications/FileManager/PropertiesWindow.cpp b/Userland/Applications/FileManager/PropertiesWindow.cpp index f268ddd690..b9a8a73b34 100644 --- a/Userland/Applications/FileManager/PropertiesWindow.cpp +++ b/Userland/Applications/FileManager/PropertiesWindow.cpp @@ -154,17 +154,17 @@ ErrorOr<void> PropertiesWindow::create_widgets(bool disable_rename) TRY(button_widget->add_spacer()); - auto ok_button = TRY(make_button(String::from_utf8_short_string("OK"sv), button_widget)); + auto ok_button = TRY(make_button("OK"_short_string, button_widget)); ok_button->on_click = [this](auto) { if (apply_changes()) close(); }; - auto cancel_button = TRY(make_button(String::from_utf8_short_string("Cancel"sv), button_widget)); + auto cancel_button = TRY(make_button("Cancel"_short_string, button_widget)); cancel_button->on_click = [this](auto) { close(); }; - m_apply_button = TRY(make_button(String::from_utf8_short_string("Apply"sv), button_widget)); + m_apply_button = TRY(make_button("Apply"_short_string, button_widget)); m_apply_button->on_click = [this](auto) { apply_changes(); }; m_apply_button->set_enabled(false); diff --git a/Userland/Applications/Help/MainWidget.cpp b/Userland/Applications/Help/MainWidget.cpp index be58ec69f1..9478604a9e 100644 --- a/Userland/Applications/Help/MainWidget.cpp +++ b/Userland/Applications/Help/MainWidget.cpp @@ -213,7 +213,7 @@ ErrorOr<void> MainWidget::initialize_fallibles(GUI::Window& window) TRY(go_menu->try_add_action(*m_go_home_action)); auto help_menu = TRY(window.try_add_menu("&Help")); - String help_page_path = TRY(TRY(try_make_ref_counted<Manual::PageNode>(Manual::sections[1 - 1], TRY(String::from_utf8("Help"sv))))->path()); + String help_page_path = TRY(TRY(try_make_ref_counted<Manual::PageNode>(Manual::sections[1 - 1], TRY("Help"_string)))->path()); TRY(help_menu->try_add_action(GUI::CommonActions::make_command_palette_action(&window))); TRY(help_menu->try_add_action(GUI::Action::create("&Contents", { Key_F1 }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-unknown.png"sv)), [this, help_page_path = move(help_page_path)](auto&) { open_page(help_page_path); diff --git a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp index 738e102d3e..438212deb6 100644 --- a/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp +++ b/Userland/Applications/KeyboardMapper/KeyboardMapperWidget.cpp @@ -88,11 +88,11 @@ void KeyboardMapperWidget::create_frame() m_map_group->set_layout<GUI::HorizontalBoxLayout>(); m_map_group->set_fixed_width(450); - add_map_radio_button("map"sv, String::from_utf8_short_string("Default"sv)); - add_map_radio_button("shift_map"sv, String::from_utf8_short_string("Shift"sv)); - add_map_radio_button("altgr_map"sv, String::from_utf8_short_string("AltGr"sv)); - add_map_radio_button("alt_map"sv, String::from_utf8_short_string("Alt"sv)); - add_map_radio_button("shift_altgr_map"sv, String::from_utf8("Shift+AltGr"sv).release_value_but_fixme_should_propagate_errors()); + add_map_radio_button("map"sv, "Default"_short_string); + add_map_radio_button("shift_map"sv, "Shift"_short_string); + add_map_radio_button("altgr_map"sv, "AltGr"_short_string); + add_map_radio_button("alt_map"sv, "Alt"_short_string); + add_map_radio_button("shift_altgr_map"sv, "Shift+AltGr"_string.release_value_but_fixme_should_propagate_errors()); bottom_widget.add_spacer().release_value_but_fixme_should_propagate_errors(); } diff --git a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp index 3d0210dee4..d2ebec6cd4 100644 --- a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp +++ b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp @@ -339,11 +339,11 @@ void PDFViewerWidget::initialize_toolbar(GUI::Toolbar& toolbar) toolbar.add_separator(); m_show_clipping_paths = toolbar.add<GUI::CheckBox>(); - m_show_clipping_paths->set_text(String::from_utf8("Show clipping paths"sv).release_value_but_fixme_should_propagate_errors()); + m_show_clipping_paths->set_text("Show clipping paths"_string.release_value_but_fixme_should_propagate_errors()); m_show_clipping_paths->set_checked(m_viewer->show_clipping_paths(), GUI::AllowCallback::No); m_show_clipping_paths->on_checked = [&](auto checked) { m_viewer->set_show_clipping_paths(checked); }; m_show_images = toolbar.add<GUI::CheckBox>(); - m_show_images->set_text(String::from_utf8("Show images"sv).release_value_but_fixme_should_propagate_errors()); + m_show_images->set_text("Show images"_string.release_value_but_fixme_should_propagate_errors()); m_show_images->set_checked(m_viewer->show_images(), GUI::AllowCallback::No); m_show_images->on_checked = [&](auto checked) { m_viewer->set_show_images(checked); }; } diff --git a/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp b/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp index dec5c81ed9..f837a5e0cf 100644 --- a/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp +++ b/Userland/Applications/PixelPaint/CreateNewImageDialog.cpp @@ -110,12 +110,12 @@ CreateNewImageDialog::CreateNewImageDialog(GUI::Window* parent_window) }; auto& set_defaults_checkbox = main_widget->add<GUI::CheckBox>(); - set_defaults_checkbox.set_text(String::from_utf8("Use these settings as default"sv).release_value_but_fixme_should_propagate_errors()); + set_defaults_checkbox.set_text("Use these settings as default"_string.release_value_but_fixme_should_propagate_errors()); auto& button_container = main_widget->add<GUI::Widget>(); button_container.set_layout<GUI::HorizontalBoxLayout>(); - auto& ok_button = button_container.add<GUI::Button>(String::from_utf8_short_string("OK"sv)); + auto& ok_button = button_container.add<GUI::Button>("OK"_short_string); ok_button.on_click = [&](auto) { if (set_defaults_checkbox.is_checked()) { Config::write_string("PixelPaint"sv, "NewImage"sv, "Name"sv, m_image_name); @@ -128,7 +128,7 @@ CreateNewImageDialog::CreateNewImageDialog(GUI::Window* parent_window) }; ok_button.set_default(true); - auto& cancel_button = button_container.add<GUI::Button>(String::from_utf8_short_string("Cancel"sv)); + auto& cancel_button = button_container.add<GUI::Button>("Cancel"_short_string); cancel_button.on_click = [this](auto) { done(ExecResult::Cancel); }; diff --git a/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp b/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp index b18123887f..a39da30d04 100644 --- a/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp +++ b/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp @@ -47,13 +47,13 @@ CreateNewLayerDialog::CreateNewLayerDialog(Gfx::IntSize suggested_size, GUI::Win auto& button_container = main_widget->add<GUI::Widget>(); button_container.set_layout<GUI::HorizontalBoxLayout>(); - auto& ok_button = button_container.add<GUI::Button>(String::from_utf8_short_string("OK"sv)); + auto& ok_button = button_container.add<GUI::Button>("OK"_short_string); ok_button.on_click = [this](auto) { done(ExecResult::OK); }; ok_button.set_default(true); - auto& cancel_button = button_container.add<GUI::Button>(String::from_utf8_short_string("Cancel"sv)); + auto& cancel_button = button_container.add<GUI::Button>("Cancel"_short_string); cancel_button.on_click = [this](auto) { done(ExecResult::Cancel); }; diff --git a/Userland/Applications/PixelPaint/FilterParams.h b/Userland/Applications/PixelPaint/FilterParams.h index e8d0d02b94..1e8df1918e 100644 --- a/Userland/Applications/PixelPaint/FilterParams.h +++ b/Userland/Applications/PixelPaint/FilterParams.h @@ -80,13 +80,13 @@ private: } } - auto& norm_checkbox = main_widget->template add<GUI::CheckBox>(String::from_utf8("Normalize"sv).release_value_but_fixme_should_propagate_errors()); + auto& norm_checkbox = main_widget->template add<GUI::CheckBox>("Normalize"_string.release_value_but_fixme_should_propagate_errors()); norm_checkbox.set_checked(false); - auto& wrap_checkbox = main_widget->template add<GUI::CheckBox>(String::from_utf8_short_string("Wrap"sv)); + auto& wrap_checkbox = main_widget->template add<GUI::CheckBox>("Wrap"_short_string); wrap_checkbox.set_checked(m_should_wrap); - auto& button = main_widget->template add<GUI::Button>(String::from_utf8_short_string("Done"sv)); + auto& button = main_widget->template add<GUI::Button>("Done"_short_string); button.on_click = [&](auto) { m_should_wrap = wrap_checkbox.is_checked(); if (norm_checkbox.is_checked()) diff --git a/Userland/Applications/PixelPaint/Filters/Bloom.cpp b/Userland/Applications/PixelPaint/Filters/Bloom.cpp index 6ebad51bce..aa51a7080f 100644 --- a/Userland/Applications/PixelPaint/Filters/Bloom.cpp +++ b/Userland/Applications/PixelPaint/Filters/Bloom.cpp @@ -69,7 +69,7 @@ ErrorOr<RefPtr<GUI::Widget>> Bloom::get_settings_widget() radius_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); radius_label->set_fixed_height(20); - auto radius_slider = TRY(radius_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + auto radius_slider = TRY(radius_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); radius_slider->set_range(0, 50); radius_slider->set_value(m_blur_radius); radius_slider->on_change = [&](int value) { diff --git a/Userland/Applications/PixelPaint/Filters/FastBoxBlur.cpp b/Userland/Applications/PixelPaint/Filters/FastBoxBlur.cpp index 6be4e75f77..870163dbd6 100644 --- a/Userland/Applications/PixelPaint/Filters/FastBoxBlur.cpp +++ b/Userland/Applications/PixelPaint/Filters/FastBoxBlur.cpp @@ -47,7 +47,7 @@ ErrorOr<RefPtr<GUI::Widget>> FastBoxBlur::get_settings_widget() name_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); name_label->set_fixed_height(10); - auto asymmetric_checkbox = TRY(settings_widget->try_add<GUI::CheckBox>(TRY(String::from_utf8("Use Asymmetric Radii"sv)))); + auto asymmetric_checkbox = TRY(settings_widget->try_add<GUI::CheckBox>(TRY("Use Asymmetric Radii"_string))); asymmetric_checkbox->set_checked(false); asymmetric_checkbox->set_fixed_height(15); asymmetric_checkbox->on_checked = [this](bool checked) { @@ -68,7 +68,7 @@ ErrorOr<RefPtr<GUI::Widget>> FastBoxBlur::get_settings_widget() update_preview(); }; - m_vector_checkbox = TRY(settings_widget->try_add<GUI::CheckBox>(TRY(String::from_utf8("Use Direction and magnitude"sv)))); + m_vector_checkbox = TRY(settings_widget->try_add<GUI::CheckBox>(TRY("Use Direction and magnitude"_string))); m_vector_checkbox->set_checked(false); m_vector_checkbox->set_visible(false); m_vector_checkbox->set_fixed_height(15); @@ -92,7 +92,7 @@ ErrorOr<RefPtr<GUI::Widget>> FastBoxBlur::get_settings_widget() radius_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); radius_label->set_fixed_size(50, 20); - auto radius_slider = TRY(m_radius_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + auto radius_slider = TRY(m_radius_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); radius_slider->set_range(0, 25); radius_slider->set_value(m_radius); radius_slider->on_change = [&](int value) { @@ -113,7 +113,7 @@ ErrorOr<RefPtr<GUI::Widget>> FastBoxBlur::get_settings_widget() radius_x_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); radius_x_label->set_fixed_size(50, 20); - m_radius_x_slider = TRY(radius_x_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + m_radius_x_slider = TRY(radius_x_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); m_radius_x_slider->set_range(0, 50); m_radius_x_slider->set_value(m_radius_x); m_radius_x_slider->on_change = [&](int value) { @@ -129,7 +129,7 @@ ErrorOr<RefPtr<GUI::Widget>> FastBoxBlur::get_settings_widget() radius_y_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); radius_y_label->set_fixed_size(50, 20); - m_radius_y_slider = TRY(radius_y_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + m_radius_y_slider = TRY(radius_y_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); m_radius_y_slider->set_range(0, 50); m_radius_y_slider->set_value(m_radius_y); m_radius_y_slider->on_change = [&](int value) { @@ -150,7 +150,7 @@ ErrorOr<RefPtr<GUI::Widget>> FastBoxBlur::get_settings_widget() angle_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); angle_label->set_fixed_size(60, 20); - m_angle_slider = TRY(angle_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("°"sv))); + m_angle_slider = TRY(angle_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "°"_short_string)); m_angle_slider->set_range(0, 360); m_angle_slider->set_value(m_angle); m_angle_slider->on_change = [&](int value) { @@ -166,7 +166,7 @@ ErrorOr<RefPtr<GUI::Widget>> FastBoxBlur::get_settings_widget() magnitude_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); magnitude_label->set_fixed_size(60, 20); - m_magnitude_slider = TRY(magnitude_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + m_magnitude_slider = TRY(magnitude_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); m_magnitude_slider->set_range(0, 50); m_magnitude_slider->set_value(m_radius); m_magnitude_slider->on_change = [&](int value) { @@ -178,7 +178,7 @@ ErrorOr<RefPtr<GUI::Widget>> FastBoxBlur::get_settings_widget() gaussian_container->set_fixed_height(20); TRY(gaussian_container->try_set_layout<GUI::HorizontalBoxLayout>(GUI::Margins { 4, 0, 4, 0 })); - m_gaussian_checkbox = TRY(gaussian_container->try_add<GUI::CheckBox>(TRY(String::from_utf8("Approximate Gaussian Blur"sv)))); + m_gaussian_checkbox = TRY(gaussian_container->try_add<GUI::CheckBox>(TRY("Approximate Gaussian Blur"_string))); m_gaussian_checkbox->set_checked(m_approximate_gauss); m_gaussian_checkbox->set_tooltip("A real gaussian blur can be approximated by running the box blur multiple times with different weights."); m_gaussian_checkbox->on_checked = [this](bool checked) { diff --git a/Userland/Applications/PixelPaint/Filters/Sepia.cpp b/Userland/Applications/PixelPaint/Filters/Sepia.cpp index 789ebdc9f5..1755e8f96a 100644 --- a/Userland/Applications/PixelPaint/Filters/Sepia.cpp +++ b/Userland/Applications/PixelPaint/Filters/Sepia.cpp @@ -36,7 +36,7 @@ ErrorOr<RefPtr<GUI::Widget>> Sepia::get_settings_widget() amount_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); amount_label->set_fixed_size(50, 20); - auto amount_slider = TRY(amount_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("%"sv))); + auto amount_slider = TRY(amount_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "%"_short_string)); amount_slider->set_range(0, 100); amount_slider->set_value(m_amount * 100); amount_slider->on_change = [this](int value) { diff --git a/Userland/Applications/PixelPaint/LayerPropertiesWidget.cpp b/Userland/Applications/PixelPaint/LayerPropertiesWidget.cpp index f436773540..c9ba4f8137 100644 --- a/Userland/Applications/PixelPaint/LayerPropertiesWidget.cpp +++ b/Userland/Applications/PixelPaint/LayerPropertiesWidget.cpp @@ -56,7 +56,7 @@ LayerPropertiesWidget::LayerPropertiesWidget() m_layer->set_opacity_percent(value); }; - m_visibility_checkbox = group_box.add<GUI::CheckBox>(String::from_utf8_short_string("Visible"sv)); + m_visibility_checkbox = group_box.add<GUI::CheckBox>("Visible"_short_string); m_visibility_checkbox->set_fixed_height(20); m_visibility_checkbox->on_checked = [this](bool checked) { if (m_layer) diff --git a/Userland/Applications/PixelPaint/Tools/BrushTool.cpp b/Userland/Applications/PixelPaint/Tools/BrushTool.cpp index 4520ecae66..383963c14b 100644 --- a/Userland/Applications/PixelPaint/Tools/BrushTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/BrushTool.cpp @@ -151,7 +151,7 @@ ErrorOr<GUI::Widget*> BrushTool::get_properties_widget() size_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); size_label->set_fixed_size(80, 20); - auto size_slider = TRY(size_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + auto size_slider = TRY(size_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); size_slider->set_range(1, 100); size_slider->set_value(m_size); size_slider->set_override_cursor(cursor()); @@ -171,7 +171,7 @@ ErrorOr<GUI::Widget*> BrushTool::get_properties_widget() hardness_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); hardness_label->set_fixed_size(80, 20); - auto hardness_slider = TRY(hardness_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("%"sv))); + auto hardness_slider = TRY(hardness_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "%"_short_string)); hardness_slider->set_range(1, 100); hardness_slider->set_value(m_hardness); diff --git a/Userland/Applications/PixelPaint/Tools/BucketTool.cpp b/Userland/Applications/PixelPaint/Tools/BucketTool.cpp index 4fc56ce9e1..39e6a83f0c 100644 --- a/Userland/Applications/PixelPaint/Tools/BucketTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/BucketTool.cpp @@ -75,7 +75,7 @@ ErrorOr<GUI::Widget*> BucketTool::get_properties_widget() threshold_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); threshold_label->set_fixed_size(80, 20); - auto threshold_slider = TRY(threshold_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("%"sv))); + auto threshold_slider = TRY(threshold_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "%"_short_string)); threshold_slider->set_range(0, 100); threshold_slider->set_value(m_threshold); diff --git a/Userland/Applications/PixelPaint/Tools/CloneTool.cpp b/Userland/Applications/PixelPaint/Tools/CloneTool.cpp index 6f3a6d333b..4e64896bba 100644 --- a/Userland/Applications/PixelPaint/Tools/CloneTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/CloneTool.cpp @@ -147,7 +147,7 @@ ErrorOr<GUI::Widget*> CloneTool::get_properties_widget() size_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); size_label->set_fixed_size(80, 20); - auto size_slider = TRY(size_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + auto size_slider = TRY(size_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); size_slider->set_range(1, 100); size_slider->set_value(size()); @@ -164,7 +164,7 @@ ErrorOr<GUI::Widget*> CloneTool::get_properties_widget() hardness_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); hardness_label->set_fixed_size(80, 20); - auto hardness_slider = TRY(hardness_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("%"sv))); + auto hardness_slider = TRY(hardness_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "%"_short_string)); hardness_slider->set_range(1, 100); hardness_slider->on_change = [&](int value) { set_hardness(value); diff --git a/Userland/Applications/PixelPaint/Tools/EllipseTool.cpp b/Userland/Applications/PixelPaint/Tools/EllipseTool.cpp index d46888b0e5..a1140171fe 100644 --- a/Userland/Applications/PixelPaint/Tools/EllipseTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/EllipseTool.cpp @@ -140,7 +140,7 @@ ErrorOr<GUI::Widget*> EllipseTool::get_properties_widget() thickness_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); thickness_label->set_fixed_size(80, 20); - auto thickness_slider = TRY(thickness_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + auto thickness_slider = TRY(thickness_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); thickness_slider->set_range(1, 10); thickness_slider->set_value(m_thickness); @@ -157,9 +157,9 @@ ErrorOr<GUI::Widget*> EllipseTool::get_properties_widget() auto mode_radio_container = TRY(mode_container->try_add<GUI::Widget>()); (void)TRY(mode_radio_container->try_set_layout<GUI::VerticalBoxLayout>()); - auto outline_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>(String::from_utf8_short_string("Outline"sv))); - auto fill_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>(String::from_utf8_short_string("Fill"sv))); - auto aa_enable_checkbox = TRY(mode_radio_container->try_add<GUI::CheckBox>(TRY(String::from_utf8("Anti-alias"sv)))); + auto outline_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>("Outline"_short_string)); + auto fill_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>("Fill"_short_string)); + auto aa_enable_checkbox = TRY(mode_radio_container->try_add<GUI::CheckBox>(TRY("Anti-alias"_string))); aa_enable_checkbox->on_checked = [this](bool checked) { m_antialias_enabled = checked; diff --git a/Userland/Applications/PixelPaint/Tools/EraseTool.cpp b/Userland/Applications/PixelPaint/Tools/EraseTool.cpp index e28ffc905f..46c432f479 100644 --- a/Userland/Applications/PixelPaint/Tools/EraseTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/EraseTool.cpp @@ -67,7 +67,7 @@ ErrorOr<GUI::Widget*> EraseTool::get_properties_widget() size_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); size_label->set_fixed_size(80, 20); - auto size_slider = TRY(size_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + auto size_slider = TRY(size_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); size_slider->set_range(1, 100); size_slider->set_value(size()); @@ -85,7 +85,7 @@ ErrorOr<GUI::Widget*> EraseTool::get_properties_widget() hardness_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); hardness_label->set_fixed_size(80, 20); - auto hardness_slider = TRY(hardness_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("%"sv))); + auto hardness_slider = TRY(hardness_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "%"_short_string)); hardness_slider->set_range(1, 100); hardness_slider->set_value(hardness()); @@ -100,7 +100,7 @@ ErrorOr<GUI::Widget*> EraseTool::get_properties_widget() auto use_secondary_color_checkbox = TRY(secondary_color_container->try_add<GUI::CheckBox>()); use_secondary_color_checkbox->set_checked(m_use_secondary_color); - use_secondary_color_checkbox->set_text(TRY(String::from_utf8("Use secondary color"sv))); + use_secondary_color_checkbox->set_text(TRY("Use secondary color"_string)); use_secondary_color_checkbox->on_checked = [this](bool checked) { m_use_secondary_color = checked; }; @@ -114,8 +114,8 @@ ErrorOr<GUI::Widget*> EraseTool::get_properties_widget() auto mode_radio_container = TRY(mode_container->try_add<GUI::Widget>()); (void)TRY(mode_radio_container->try_set_layout<GUI::VerticalBoxLayout>()); - auto pencil_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>(String::from_utf8_short_string("Pencil"sv))); - auto brush_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>(String::from_utf8_short_string("Brush"sv))); + auto pencil_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>("Pencil"_short_string)); + auto brush_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>("Brush"_short_string)); pencil_mode_radio->on_checked = [this, hardness_slider, size_slider](bool) { m_draw_mode = DrawMode::Pencil; diff --git a/Userland/Applications/PixelPaint/Tools/GradientTool.cpp b/Userland/Applications/PixelPaint/Tools/GradientTool.cpp index b8f7181ecd..78bb405cc3 100644 --- a/Userland/Applications/PixelPaint/Tools/GradientTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/GradientTool.cpp @@ -206,7 +206,7 @@ ErrorOr<GUI::Widget*> GradientTool::get_properties_widget() set_primary_slider(opacity_slider); - auto use_secondary_color_checkbox = TRY(properties_widget->try_add<GUI::CheckBox>(TRY(String::from_utf8("Use secondary color"sv)))); + auto use_secondary_color_checkbox = TRY(properties_widget->try_add<GUI::CheckBox>(TRY("Use secondary color"_string))); use_secondary_color_checkbox->on_checked = [this](bool checked) { m_use_secondary_color = checked; m_editor->update(); @@ -217,7 +217,7 @@ ErrorOr<GUI::Widget*> GradientTool::get_properties_widget() TRY(button_container->try_set_layout<GUI::HorizontalBoxLayout>()); button_container->add_spacer().release_value_but_fixme_should_propagate_errors(); - auto apply_button = TRY(button_container->try_add<GUI::DialogButton>(String::from_utf8_short_string("Apply"sv))); + auto apply_button = TRY(button_container->try_add<GUI::DialogButton>("Apply"_short_string)); apply_button->on_click = [this](auto) { rasterize_gradient(); }; diff --git a/Userland/Applications/PixelPaint/Tools/GuideTool.cpp b/Userland/Applications/PixelPaint/Tools/GuideTool.cpp index 67d3c15e23..ac1b5f1073 100644 --- a/Userland/Applications/PixelPaint/Tools/GuideTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/GuideTool.cpp @@ -191,7 +191,7 @@ ErrorOr<GUI::Widget*> GuideTool::get_properties_widget() snapping_label->set_fixed_size(80, 20); snapping_label->set_tooltip("Press Shift to snap"); - auto snapping_slider = TRY(snapping_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + auto snapping_slider = TRY(snapping_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); snapping_slider->set_range(0, 50); snapping_slider->set_value(m_snap_size); diff --git a/Userland/Applications/PixelPaint/Tools/LineTool.cpp b/Userland/Applications/PixelPaint/Tools/LineTool.cpp index 7aa170cc97..a6cfc85caa 100644 --- a/Userland/Applications/PixelPaint/Tools/LineTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/LineTool.cpp @@ -133,7 +133,7 @@ ErrorOr<GUI::Widget*> LineTool::get_properties_widget() thickness_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); thickness_label->set_fixed_size(80, 20); - auto thickness_slider = TRY(thickness_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + auto thickness_slider = TRY(thickness_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); thickness_slider->set_range(1, 10); thickness_slider->set_value(m_thickness); @@ -150,7 +150,7 @@ ErrorOr<GUI::Widget*> LineTool::get_properties_widget() mode_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); mode_label->set_fixed_size(80, 20); - auto aa_enable_checkbox = TRY(mode_container->try_add<GUI::CheckBox>(TRY(String::from_utf8("Anti-alias"sv)))); + auto aa_enable_checkbox = TRY(mode_container->try_add<GUI::CheckBox>(TRY("Anti-alias"_string))); aa_enable_checkbox->on_checked = [this](bool checked) { m_antialias_enabled = checked; }; diff --git a/Userland/Applications/PixelPaint/Tools/MoveTool.cpp b/Userland/Applications/PixelPaint/Tools/MoveTool.cpp index 0dd4a902ef..10252259bc 100644 --- a/Userland/Applications/PixelPaint/Tools/MoveTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/MoveTool.cpp @@ -304,9 +304,9 @@ ErrorOr<GUI::Widget*> MoveTool::get_properties_widget() auto mode_radio_container = TRY(selection_mode_container->try_add<GUI::Widget>()); (void)TRY(mode_radio_container->try_set_layout<GUI::VerticalBoxLayout>()); - m_selection_mode_foreground = TRY(mode_radio_container->try_add<GUI::RadioButton>(TRY(String::from_utf8("Foreground"sv)))); + m_selection_mode_foreground = TRY(mode_radio_container->try_add<GUI::RadioButton>(TRY("Foreground"_string))); - m_selection_mode_active = TRY(mode_radio_container->try_add<GUI::RadioButton>(TRY(String::from_utf8("Active Layer"sv)))); + m_selection_mode_active = TRY(mode_radio_container->try_add<GUI::RadioButton>(TRY("Active Layer"_string))); m_selection_mode_foreground->on_checked = [this](bool) { m_layer_selection_mode = LayerSelectionMode::ForegroundLayer; diff --git a/Userland/Applications/PixelPaint/Tools/PenTool.cpp b/Userland/Applications/PixelPaint/Tools/PenTool.cpp index e6233c971b..b72c48ef73 100644 --- a/Userland/Applications/PixelPaint/Tools/PenTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/PenTool.cpp @@ -49,7 +49,7 @@ ErrorOr<GUI::Widget*> PenTool::get_properties_widget() size_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); size_label->set_fixed_size(80, 20); - auto size_slider = TRY(size_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + auto size_slider = TRY(size_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); size_slider->set_range(1, 20); size_slider->set_value(size()); diff --git a/Userland/Applications/PixelPaint/Tools/PickerTool.cpp b/Userland/Applications/PixelPaint/Tools/PickerTool.cpp index 5f95194300..ce231098a8 100644 --- a/Userland/Applications/PixelPaint/Tools/PickerTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/PickerTool.cpp @@ -46,7 +46,7 @@ ErrorOr<GUI::Widget*> PickerTool::get_properties_widget() auto properties_widget = TRY(GUI::Widget::try_create()); (void)TRY(properties_widget->try_set_layout<GUI::VerticalBoxLayout>()); - auto sample_checkbox = TRY(properties_widget->try_add<GUI::CheckBox>(TRY(String::from_utf8("Sample all layers"sv)))); + auto sample_checkbox = TRY(properties_widget->try_add<GUI::CheckBox>(TRY("Sample all layers"_string))); sample_checkbox->set_checked(m_sample_all_layers); sample_checkbox->on_checked = [this](bool value) { m_sample_all_layers = value; diff --git a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp index 0375b3b26c..f1bfc6c269 100644 --- a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp @@ -166,7 +166,7 @@ ErrorOr<GUI::Widget*> RectangleSelectTool::get_properties_widget() feather_label->set_fixed_size(80, 20); int const feather_slider_max = 100; - auto feather_slider = TRY(feather_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("%"sv))); + auto feather_slider = TRY(feather_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "%"_short_string)); feather_slider->set_range(0, feather_slider_max); feather_slider->set_value((int)floorf(m_edge_feathering * (float)feather_slider_max)); diff --git a/Userland/Applications/PixelPaint/Tools/RectangleTool.cpp b/Userland/Applications/PixelPaint/Tools/RectangleTool.cpp index d41d26f0b8..f7987dd1dd 100644 --- a/Userland/Applications/PixelPaint/Tools/RectangleTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/RectangleTool.cpp @@ -154,7 +154,7 @@ ErrorOr<GUI::Widget*> RectangleTool::get_properties_widget() thickness_or_radius_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); thickness_or_radius_label->set_fixed_size(80, 20); - auto thickness_or_radius_slider = TRY(thickness_or_radius_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + auto thickness_or_radius_slider = TRY(thickness_or_radius_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); thickness_or_radius_slider->on_change = [&](int value) { if (m_fill_mode == FillMode::RoundedCorners) { @@ -187,12 +187,12 @@ ErrorOr<GUI::Widget*> RectangleTool::get_properties_widget() auto mode_radio_container = TRY(mode_container->try_add<GUI::Widget>()); (void)TRY(mode_radio_container->try_set_layout<GUI::VerticalBoxLayout>()); - auto outline_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>(String::from_utf8_short_string("Outline"sv))); - auto fill_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>(String::from_utf8_short_string("Fill"sv))); - auto gradient_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>(TRY(String::from_utf8("Gradient"sv)))); + auto outline_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>("Outline"_short_string)); + auto fill_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>("Fill"_short_string)); + auto gradient_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>(TRY("Gradient"_string))); mode_radio_container->set_fixed_width(70); - auto rounded_corners_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>(String::from_utf8_short_string("Rounded"sv))); + auto rounded_corners_mode_radio = TRY(mode_radio_container->try_add<GUI::RadioButton>("Rounded"_short_string)); outline_mode_radio->on_checked = [this, update_slider](bool) { m_fill_mode = FillMode::Outline; @@ -215,7 +215,7 @@ ErrorOr<GUI::Widget*> RectangleTool::get_properties_widget() auto mode_extras_container = TRY(mode_container->try_add<GUI::Widget>()); (void)TRY(mode_extras_container->try_set_layout<GUI::VerticalBoxLayout>()); - auto aa_enable_checkbox = TRY(mode_extras_container->try_add<GUI::CheckBox>(TRY(String::from_utf8("Anti-alias"sv)))); + auto aa_enable_checkbox = TRY(mode_extras_container->try_add<GUI::CheckBox>(TRY("Anti-alias"_string))); aa_enable_checkbox->on_checked = [this](bool checked) { m_antialias_enabled = checked; }; diff --git a/Userland/Applications/PixelPaint/Tools/SprayTool.cpp b/Userland/Applications/PixelPaint/Tools/SprayTool.cpp index aaf2ef652d..c56185e781 100644 --- a/Userland/Applications/PixelPaint/Tools/SprayTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/SprayTool.cpp @@ -104,7 +104,7 @@ ErrorOr<GUI::Widget*> SprayTool::get_properties_widget() size_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); size_label->set_fixed_size(80, 20); - auto size_slider = TRY(size_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("px"sv))); + auto size_slider = TRY(size_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "px"_short_string)); size_slider->set_range(1, 20); size_slider->set_value(m_thickness); @@ -121,7 +121,7 @@ ErrorOr<GUI::Widget*> SprayTool::get_properties_widget() density_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); density_label->set_fixed_size(80, 20); - auto density_slider = TRY(density_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("%"sv))); + auto density_slider = TRY(density_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "%"_short_string)); density_slider->set_range(1, 100); density_slider->set_value(m_density); diff --git a/Userland/Applications/PixelPaint/Tools/TextTool.cpp b/Userland/Applications/PixelPaint/Tools/TextTool.cpp index 3a030571df..e8488104d9 100644 --- a/Userland/Applications/PixelPaint/Tools/TextTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/TextTool.cpp @@ -116,7 +116,7 @@ ErrorOr<GUI::Widget*> TextTool::get_properties_widget() m_font_label = TRY(properties_widget->try_add<GUI::Label>(m_selected_font->human_readable_name())); - auto change_font_button = TRY(properties_widget->try_add<GUI::Button>(TRY(String::from_utf8("Change Font..."sv)))); + auto change_font_button = TRY(properties_widget->try_add<GUI::Button>(TRY("Change Font..."_string))); change_font_button->on_click = [this](auto) { auto picker = GUI::FontPicker::construct(nullptr, m_selected_font, false); if (picker->exec() == GUI::Dialog::ExecResult::OK) { diff --git a/Userland/Applications/PixelPaint/Tools/WandSelectTool.cpp b/Userland/Applications/PixelPaint/Tools/WandSelectTool.cpp index 45bf033ac6..74dbb0c019 100644 --- a/Userland/Applications/PixelPaint/Tools/WandSelectTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/WandSelectTool.cpp @@ -81,7 +81,7 @@ ErrorOr<GUI::Widget*> WandSelectTool::get_properties_widget() threshold_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); threshold_label->set_fixed_size(80, 20); - auto threshold_slider = TRY(threshold_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("%"sv))); + auto threshold_slider = TRY(threshold_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "%"_short_string)); threshold_slider->set_range(0, 100); threshold_slider->set_value(m_threshold); diff --git a/Userland/Applications/PixelPaint/Tools/ZoomTool.cpp b/Userland/Applications/PixelPaint/Tools/ZoomTool.cpp index 78ad3c4829..dc61602174 100644 --- a/Userland/Applications/PixelPaint/Tools/ZoomTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/ZoomTool.cpp @@ -37,7 +37,7 @@ ErrorOr<GUI::Widget*> ZoomTool::get_properties_widget() sensitivity_label->set_text_alignment(Gfx::TextAlignment::CenterLeft); sensitivity_label->set_fixed_size(80, 20); - auto sensitivity_slider = TRY(sensitivity_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, String::from_utf8_short_string("%"sv))); + auto sensitivity_slider = TRY(sensitivity_container->try_add<GUI::ValueSlider>(Orientation::Horizontal, "%"_short_string)); sensitivity_slider->set_range(1, 100); sensitivity_slider->set_value(100 * m_sensitivity); diff --git a/Userland/Applications/Spreadsheet/CellTypeDialog.cpp b/Userland/Applications/Spreadsheet/CellTypeDialog.cpp index 4e38fe7413..1f5979217d 100644 --- a/Userland/Applications/Spreadsheet/CellTypeDialog.cpp +++ b/Userland/Applications/Spreadsheet/CellTypeDialog.cpp @@ -56,7 +56,7 @@ CellTypeDialog::CellTypeDialog(Vector<Position> const& positions, Sheet& sheet, buttonbox.set_shrink_to_fit(true); buttonbox.set_layout<GUI::HorizontalBoxLayout>(GUI::Margins {}, 10); buttonbox.add_spacer().release_value_but_fixme_should_propagate_errors(); - auto& ok_button = buttonbox.add<GUI::Button>(String::from_utf8_short_string("OK"sv)); + auto& ok_button = buttonbox.add<GUI::Button>("OK"_short_string); ok_button.set_fixed_width(80); ok_button.on_click = [&](auto) { done(ExecResult::OK); }; } @@ -157,7 +157,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector<Position> const& po }; { - auto& checkbox = right_side.add<GUI::CheckBox>(String::from_utf8("Override max length"sv).release_value_but_fixme_should_propagate_errors()); + auto& checkbox = right_side.add<GUI::CheckBox>("Override max length"_string.release_value_but_fixme_should_propagate_errors()); auto& spinbox = right_side.add<GUI::SpinBox>(); checkbox.set_checked(m_length != -1); spinbox.set_min(0); @@ -177,7 +177,7 @@ void CellTypeDialog::setup_tabs(GUI::TabWidget& tabs, Vector<Position> const& po }; } { - auto& checkbox = right_side.add<GUI::CheckBox>(String::from_utf8("Override display format"sv).release_value_but_fixme_should_propagate_errors()); + auto& checkbox = right_side.add<GUI::CheckBox>("Override display format"_string.release_value_but_fixme_should_propagate_errors()); auto& editor = right_side.add<GUI::TextEditor>(); checkbox.set_checked(!m_format.is_empty()); editor.set_name("format_editor"); diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index 72da1fc030..3aa8f7d6cf 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -201,8 +201,8 @@ static ErrorOr<NonnullRefPtr<GUI::Window>> create_find_window(VT::TerminalWidget find_forwards->click(); }; - auto match_case = TRY(main_widget->try_add<GUI::CheckBox>(TRY(String::from_utf8("Case sensitive"sv)))); - auto wrap_around = TRY(main_widget->try_add<GUI::CheckBox>(TRY(String::from_utf8("Wrap around"sv)))); + auto match_case = TRY(main_widget->try_add<GUI::CheckBox>(TRY("Case sensitive"_string))); + auto wrap_around = TRY(main_widget->try_add<GUI::CheckBox>(TRY("Wrap around"_string))); find_backwards->on_click = [&terminal, find_textbox, match_case, wrap_around](auto) { auto needle = find_textbox->text(); |