|
|
@ -1529,20 +1529,23 @@ void MainWindow::updateGUI() |
|
|
|
#ifndef Q_OS_MAC |
|
|
|
#ifndef Q_OS_MAC |
|
|
|
if (m_systrayIcon) { |
|
|
|
if (m_systrayIcon) { |
|
|
|
#ifdef Q_OS_UNIX |
|
|
|
#ifdef Q_OS_UNIX |
|
|
|
QString html = "<div style='background-color: #678db2; color: #fff;height: 18px; font-weight: bold; margin-bottom: 5px;'>"; |
|
|
|
const QString html = QString(QLatin1String( |
|
|
|
html += "qBittorrent"; |
|
|
|
"<div style='background-color: #678db2; color: #fff;height: 18px; font-weight: bold; margin-bottom: 5px;'>" |
|
|
|
html += "</div>"; |
|
|
|
"qBittorrent" |
|
|
|
html += "<div style='vertical-align: baseline; height: 18px;'>"; |
|
|
|
"</div>" |
|
|
|
html += "<img src=':/icons/skin/download.svg' height='14'/> " + tr("DL speed: %1", "e.g: Download speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadDownloadRate, true)); |
|
|
|
"<div style='vertical-align: baseline; height: 18px;'>" |
|
|
|
html += "</div>"; |
|
|
|
"<img src=':/icons/skin/download.svg' height='14'/> %1" |
|
|
|
html += "<div style='vertical-align: baseline; height: 18px;'>"; |
|
|
|
"</div>" |
|
|
|
html += "<img src=':/icons/skin/seeding.svg' height='14'/> " + tr("UP speed: %1", "e.g: Upload speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadUploadRate, true)); |
|
|
|
"<div style='vertical-align: baseline; height: 18px;'>" |
|
|
|
html += "</div>"; |
|
|
|
"<img src=':/icons/skin/seeding.svg' height='14'/> %2" |
|
|
|
|
|
|
|
"</div>")) |
|
|
|
|
|
|
|
.arg(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))); |
|
|
|
#else |
|
|
|
#else |
|
|
|
// OSes such as Windows do not support html here
|
|
|
|
// OSes such as Windows do not support html here
|
|
|
|
QString html = tr("DL speed: %1", "e.g: Download speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadDownloadRate, true)); |
|
|
|
const QString html = QString("%1\n%2").arg( |
|
|
|
html += '\n'; |
|
|
|
tr("DL speed: %1", "e.g: Download speed: 10 KiB/s").arg(Utils::Misc::friendlyUnit(status.payloadDownloadRate, true)) |
|
|
|
html += 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
|
|
|
|
#endif // Q_OS_UNIX
|
|
|
|
m_systrayIcon->setToolTip(html); // tray icon
|
|
|
|
m_systrayIcon->setToolTip(html); // tray icon
|
|
|
|
} |
|
|
|
} |
|
|
|