1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:57:44 +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

@ -42,11 +42,11 @@ SettingsDialog::SettingsDialog(GUI::Window* parent, DeprecatedString player_name
auto& button_layout = button_box.set_layout<GUI::HorizontalBoxLayout>();
button_layout.set_spacing(10);
button_box.add<GUI::Button>("Cancel").on_click = [this](auto) {
button_box.add<GUI::Button>(String::from_utf8_short_string("Cancel"sv)).on_click = [this](auto) {
done(ExecResult::Cancel);
};
button_box.add<GUI::Button>("OK").on_click = [this](auto) {
button_box.add<GUI::Button>(String::from_utf8_short_string("OK"sv)).on_click = [this](auto) {
done(ExecResult::OK);
};
}