1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:38:11 +00:00

Userland: Set Button text using the new String class

This commit is contained in:
Karol Kosek 2023-02-11 20:51:04 +01:00 committed by Linus Groh
parent b5cb9a9ebb
commit e39adc4772
49 changed files with 134 additions and 127 deletions

View file

@ -234,14 +234,14 @@ void ColorPicker::build_ui()
button_container.layout()->add_spacer();
auto& ok_button = button_container.add<DialogButton>();
ok_button.set_text_deprecated("OK");
ok_button.set_text(String::from_utf8_short_string("OK"sv));
ok_button.on_click = [this](auto) {
done(ExecResult::OK);
};
ok_button.set_default(true);
auto& cancel_button = button_container.add<DialogButton>();
cancel_button.set_text_deprecated("Cancel");
cancel_button.set_text(String::from_utf8_short_string("Cancel"sv));
cancel_button.on_click = [this](auto) {
done(ExecResult::Cancel);
};
@ -416,7 +416,7 @@ void ColorPicker::build_ui_custom(Widget& root_container)
make_spinbox(Blue, m_color.blue());
make_spinbox(Alpha, m_color.alpha());
m_selector_button = vertical_container.add<GUI::Button>("Select on screen");
m_selector_button = vertical_container.add<GUI::Button>(String::from_utf8("Select on screen"sv).release_value_but_fixme_should_propagate_errors());
m_selector_button->on_click = [this](auto) {
auto selector = ColorSelectOverlay::construct();
auto original_color = m_color;