From 90774bb8acbe31adf55f86f78fca3c2f1b5d9b6e Mon Sep 17 00:00:00 2001 From: James Date: Fri, 9 Dec 2022 11:14:56 -0600 Subject: [PATCH 1/2] update tooltip on allies/private button on chat closes #1160 --- client/chatline.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/chatline.cpp b/client/chatline.cpp index f5717461fe..61784ff9af 100644 --- a/client/chatline.cpp +++ b/client/chatline.cpp @@ -425,6 +425,11 @@ chat_widget::chat_widget(QWidget *parent) priv ? QLatin1String("public") : QLatin1String("private"); cb->setIcon(fcIcons::instance()->getIcon(icon_name)); gui_options->gui_qt_allied_chat_only = priv; + if (cb->isChecked()) { + cb->setToolTip(_("Allies only")); + } else { + cb->setToolTip(_("Private")); + } }); connect(chat_output, &QTextBrowser::anchorClicked, this, &chat_widget::anchor_clicked); From 204bba72d14943ddb6e54a0e2f12a5375f028dfe Mon Sep 17 00:00:00 2001 From: James Date: Fri, 9 Dec 2022 14:39:04 -0600 Subject: [PATCH 2/2] Add QStringLiteral to calls for getIcon() --- client/chatline.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/chatline.cpp b/client/chatline.cpp index 61784ff9af..e5634703af 100644 --- a/client/chatline.cpp +++ b/client/chatline.cpp @@ -373,7 +373,7 @@ chat_widget::chat_widget(QWidget *parent) cb->setIconSize(QSize(24, 24)); cb->setFixedWidth(25); cb->setFixedHeight(25); - cb->setIcon(fcIcons::instance()->getIcon("private")); + cb->setIcon(fcIcons::instance()->getIcon(QStringLiteral("private"))); cb->setToolTip(_("Allies only")); cb->setCheckable(true); @@ -384,11 +384,13 @@ chat_widget::chat_widget(QWidget *parent) remove_links->setIconSize(QSize(24, 24)); remove_links->setFixedWidth(25); remove_links->setFixedHeight(25); - remove_links->setIcon(fcIcons::instance()->getIcon("erase")); + remove_links->setIcon( + fcIcons::instance()->getIcon(QStringLiteral("erase"))); remove_links->setToolTip(_("Clear links")); show_hide = new QPushButton(); - show_hide->setIcon(fcIcons::instance()->getIcon("expand-down")); + show_hide->setIcon( + fcIcons::instance()->getIcon(QStringLiteral("expand-down"))); show_hide->setIconSize(QSize(24, 24)); show_hide->setFixedWidth(25); show_hide->setFixedHeight(25);