1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +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

@ -87,7 +87,7 @@ private:
m_root_container->set_frame_style(Gfx::FrameStyle::Window);
m_percent_box = m_root_container->add<GUI::CheckBox>("\xE2\x84\xB9"_string);
m_percent_box->set_tooltip_deprecated(show_percent() ? "Hide percent" : "Show percent");
m_percent_box->set_tooltip(show_percent() ? "Hide percent"_string : "Show percent"_string);
m_percent_box->set_checked(show_percent());
m_percent_box->on_checked = [&](bool show_percent) {
set_show_percent(show_percent);
@ -111,9 +111,9 @@ private:
m_mute_box = m_root_container->add<GUI::CheckBox>("\xE2\x9D\x8C"_string);
m_mute_box->set_checked(m_audio_muted);
m_mute_box->set_tooltip_deprecated(m_audio_muted ? "Unmute" : "Mute");
m_mute_box->set_tooltip(m_audio_muted ? "Unmute"_string : "Mute"_string);
m_mute_box->on_checked = [&](bool is_muted) {
m_mute_box->set_tooltip_deprecated(is_muted ? "Unmute" : "Mute");
m_mute_box->set_tooltip(is_muted ? "Unmute"_string : "Mute"_string);
m_audio_client->set_main_mix_muted(is_muted);
GUI::Application::the()->hide_tooltip();
};
@ -129,7 +129,7 @@ public:
{
m_show_percent = show_percent;
m_percent_box->set_checked(show_percent);
m_percent_box->set_tooltip_deprecated(show_percent ? "Hide percent" : "Show percent");
m_percent_box->set_tooltip(show_percent ? "Hide percent"_string : "Show percent"_string);
if (show_percent)
window()->resize(44, 16);
else