1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 18:37:35 +00:00

Userland: Use nondeprecated set_tooltip for static and formatted strings

This commit is contained in:
Karol Kosek 2023-08-23 20:14:42 +02:00 committed by Andreas Kling
parent 46a97844c7
commit ed3e729d4e
18 changed files with 45 additions and 45 deletions

View file

@ -30,7 +30,7 @@ ClockWidget::ClockWidget()
if (now != last_update_time) {
tick_clock();
last_update_time = now;
set_tooltip_deprecated(Core::DateTime::now().to_deprecated_string("%Y-%m-%d"sv));
set_tooltip(MUST(Core::DateTime::now().to_string("%Y-%m-%d"sv)));
}
});
m_timer->start();
@ -107,7 +107,7 @@ ClockWidget::ClockWidget()
m_jump_to_button->set_button_style(Gfx::ButtonStyle::Coolbar);
m_jump_to_button->set_fixed_size(24, 24);
m_jump_to_button->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/calendar-date.png"sv).release_value_but_fixme_should_propagate_errors());
m_jump_to_button->set_tooltip_deprecated("Jump to today");
m_jump_to_button->set_tooltip("Jump to today"_string);
m_jump_to_button->on_click = [this](auto) {
jump_to_current_date();
};
@ -116,7 +116,7 @@ ClockWidget::ClockWidget()
m_calendar_launcher->set_button_style(Gfx::ButtonStyle::Coolbar);
m_calendar_launcher->set_fixed_size(24, 24);
m_calendar_launcher->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-calendar.png"sv).release_value_but_fixme_should_propagate_errors());
m_calendar_launcher->set_tooltip_deprecated("Calendar");
m_calendar_launcher->set_tooltip("Calendar"_string);
m_calendar_launcher->on_click = [this](auto) {
GUI::Process::spawn_or_show_error(window(), "/bin/Calendar"sv);
};

View file

@ -89,7 +89,7 @@ ErrorOr<void> TaskbarWindow::populate_taskbar()
m_clock_widget = main_widget->add<Taskbar::ClockWidget>();
m_show_desktop_button = main_widget->add<GUI::Button>();
m_show_desktop_button->set_tooltip_deprecated("Show Desktop");
m_show_desktop_button->set_tooltip("Show Desktop"_string);
m_show_desktop_button->set_icon(TRY(GUI::Icon::try_create_default_icon("desktop"sv)).bitmap_for_size(16));
m_show_desktop_button->set_button_style(Gfx::ButtonStyle::Coolbar);
m_show_desktop_button->set_fixed_size(24, 24);