summaryrefslogtreecommitdiff
path: root/Userland/Services/Taskbar
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services/Taskbar')
-rw-r--r--Userland/Services/Taskbar/ShutdownDialog.cpp6
-rw-r--r--Userland/Services/Taskbar/TaskbarButton.cpp10
-rw-r--r--Userland/Services/Taskbar/TaskbarWindow.cpp4
3 files changed, 10 insertions, 10 deletions
diff --git a/Userland/Services/Taskbar/ShutdownDialog.cpp b/Userland/Services/Taskbar/ShutdownDialog.cpp
index 9dd87d51ca..ae4d93aa7f 100644
--- a/Userland/Services/Taskbar/ShutdownDialog.cpp
+++ b/Userland/Services/Taskbar/ShutdownDialog.cpp
@@ -78,7 +78,7 @@ ShutdownDialog::ShutdownDialog()
auto action = options[i];
auto& radio = right_container.add<GUI::RadioButton>();
radio.set_enabled(action.enabled);
- radio.set_text_deprecated(action.title);
+ radio.set_text(String::from_deprecated_string(action.title).release_value_but_fixme_should_propagate_errors());
radio.on_checked = [this, i](auto) {
m_selected_option = i;
@@ -97,13 +97,13 @@ ShutdownDialog::ShutdownDialog()
button_container.set_layout<GUI::HorizontalBoxLayout>();
button_container.layout()->set_spacing(5);
button_container.layout()->add_spacer();
- auto& ok_button = button_container.add<GUI::Button>("OK");
+ auto& ok_button = button_container.add<GUI::Button>(String::from_utf8_short_string("OK"sv));
ok_button.set_fixed_size(80, 23);
ok_button.on_click = [this](auto) {
done(ExecResult::OK);
};
ok_button.set_default(true);
- auto& cancel_button = button_container.add<GUI::Button>("Cancel");
+ auto& cancel_button = button_container.add<GUI::Button>(String::from_utf8_short_string("Cancel"sv));
cancel_button.set_fixed_size(80, 23);
cancel_button.on_click = [this](auto) {
done(ExecResult::Cancel);
diff --git a/Userland/Services/Taskbar/TaskbarButton.cpp b/Userland/Services/Taskbar/TaskbarButton.cpp
index a2e01ba172..5b8d748438 100644
--- a/Userland/Services/Taskbar/TaskbarButton.cpp
+++ b/Userland/Services/Taskbar/TaskbarButton.cpp
@@ -93,20 +93,20 @@ void TaskbarButton::paint_event(GUI::PaintEvent& event)
Gfx::StylePainter::paint_button(painter, rect(), palette(), button_style(), is_being_pressed(), is_hovered(), is_checked(), is_enabled());
- if (text_deprecated().is_empty())
+ if (text().is_empty())
return;
auto content_rect = rect().shrunken(8, 2);
auto icon_location = content_rect.center().translated(-(icon.width() / 2), -(icon.height() / 2));
- if (!text_deprecated().is_empty())
+ if (!text().is_empty())
icon_location.set_x(content_rect.x());
- if (!text_deprecated().is_empty()) {
+ if (!text().is_empty()) {
content_rect.translate_by(icon.width() + 4, 0);
content_rect.set_width(content_rect.width() - icon.width() - 4);
}
- Gfx::IntRect text_rect { 0, 0, static_cast<int>(ceilf(font.width(text_deprecated()))), font.glyph_height() };
+ Gfx::IntRect text_rect { 0, 0, static_cast<int>(ceilf(font.width(text()))), font.glyph_height() };
if (text_rect.width() > content_rect.width())
text_rect.set_width(content_rect.width());
text_rect.align_within(content_rect, text_alignment());
@@ -123,7 +123,7 @@ void TaskbarButton::paint_event(GUI::PaintEvent& event)
adjusted_rect.set_width(adjusted_rect.width() + 1);
adjusted_rect.set_height(adjusted_rect.height() + 1);
}
- paint_custom_progressbar(painter, adjusted_rect, text_rect, palette(), 0, 100, window.progress().value(), text_deprecated(), font, text_alignment());
+ paint_custom_progressbar(painter, adjusted_rect, text_rect, palette(), 0, 100, window.progress().value(), text(), font, text_alignment());
}
if (is_enabled()) {
diff --git a/Userland/Services/Taskbar/TaskbarWindow.cpp b/Userland/Services/Taskbar/TaskbarWindow.cpp
index 648fe65d97..bb4cb91773 100644
--- a/Userland/Services/Taskbar/TaskbarWindow.cpp
+++ b/Userland/Services/Taskbar/TaskbarWindow.cpp
@@ -114,7 +114,7 @@ void TaskbarWindow::add_system_menu(NonnullRefPtr<GUI::Menu> system_menu)
{
m_system_menu = move(system_menu);
- m_start_button = GUI::Button::construct("Serenity");
+ m_start_button = GUI::Button::construct(String::from_utf8("Serenity"sv).release_value_but_fixme_should_propagate_errors());
set_start_button_font(Gfx::FontDatabase::default_font().bold_variant());
m_start_button->set_icon_spacing(0);
auto app_icon = GUI::Icon::default_icon("ladyball"sv);
@@ -202,7 +202,7 @@ void TaskbarWindow::update_window_button(::Window& window, bool show_as_active)
auto* button = window.button();
if (!button)
return;
- button->set_text_deprecated(window.title());
+ button->set_text(String::from_deprecated_string(window.title()).release_value_but_fixme_should_propagate_errors());
button->set_tooltip(window.title());
button->set_checked(show_as_active);
button->set_visible(is_window_on_current_workspace(window));