mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-09 21:34:20 +00:00
Merge pull request #13366 from qbittorrent/linuxtrayhtml
Don't use HTML in Linux tray tooltip
This commit is contained in:
commit
ff82063520
@ -1540,27 +1540,9 @@ void MainWindow::reloadSessionStats()
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (m_systrayIcon) {
|
if (m_systrayIcon) {
|
||||||
#ifdef Q_OS_UNIX
|
|
||||||
const QString toolTip = QString::fromLatin1(
|
|
||||||
"<div style='background-color: #678db2; color: #fff;height: 18px; font-weight: bold; margin-bottom: 5px;'>"
|
|
||||||
"qBittorrent"
|
|
||||||
"</div>"
|
|
||||||
"<div style='vertical-align: baseline; height: 18px;'>"
|
|
||||||
"<img src='%1' height='14'/> %2"
|
|
||||||
"</div>"
|
|
||||||
"<div style='vertical-align: baseline; height: 18px;'>"
|
|
||||||
"<img src='%3' height='14'/> %4"
|
|
||||||
"</div>")
|
|
||||||
.arg(UIThemeManager::instance()->getIconPath("downloading_small")
|
|
||||||
, tr("DL speed: %1", "e.g: Download speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadDownloadRate, true))
|
|
||||||
, UIThemeManager::instance()->getIconPath("seeding")
|
|
||||||
, tr("UP speed: %1", "e.g: Upload speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadUploadRate, true)));
|
|
||||||
#else
|
|
||||||
// OSes such as Windows do not support html here
|
|
||||||
const QString toolTip = QString::fromLatin1("%1\n%2").arg(
|
const QString toolTip = QString::fromLatin1("%1\n%2").arg(
|
||||||
tr("DL speed: %1", "e.g: Download speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadDownloadRate, true))
|
tr("DL speed: %1", "e.g: Download speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadDownloadRate, true))
|
||||||
, tr("UP speed: %1", "e.g: Upload speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadUploadRate, true)));
|
, tr("UP speed: %1", "e.g: Upload speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadUploadRate, true)));
|
||||||
#endif // Q_OS_UNIX
|
|
||||||
m_systrayIcon->setToolTip(toolTip); // tray icon
|
m_systrayIcon->setToolTip(toolTip); // tray icon
|
||||||
}
|
}
|
||||||
#endif // Q_OS_MACOS
|
#endif // Q_OS_MACOS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user