Move all icon resources to icon folder root

This commit is contained in:
jagannatharjun
2020-05-18 20:30:51 +05:30
parent 841536c9c5
commit ab91d546e5
166 changed files with 353 additions and 396 deletions

View File

@@ -45,7 +45,7 @@ AboutDialog::AboutDialog(QWidget *parent)
// Title
m_ui->labelName->setText(QString::fromLatin1("<b><h2>qBittorrent " QBT_VERSION " (%1-bit)</h2></b>").arg(QT_POINTER_SIZE * 8));
m_ui->logo->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/skin/qbittorrent-tray.svg", this, 32));
m_ui->logo->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/qbittorrent-tray.svg", this, 32));
// About
const QString aboutText = QString(
@@ -65,7 +65,7 @@ AboutDialog::AboutDialog(QWidget *parent)
, tr("Bug Tracker:"));
m_ui->labelAbout->setText(aboutText);
m_ui->labelMascot->setPixmap(Utils::Gui::scaledPixmap(":/icons/skin/mascot.png", this));
m_ui->labelMascot->setPixmap(Utils::Gui::scaledPixmap(":/icons/mascot.png", this));
// Thanks
QFile thanksfile(":/thanks.html");

View File

@@ -152,10 +152,10 @@ MainWindow::MainWindow(QWidget *parent)
#ifndef Q_OS_MACOS
#ifdef Q_OS_UNIX
const QIcon appLogo = Preferences::instance()->useSystemIconTheme()
? QIcon::fromTheme("qbittorrent", QIcon(":/icons/skin/qbittorrent-tray.svg"))
: QIcon(":/icons/skin/qbittorrent-tray.svg");
? QIcon::fromTheme("qbittorrent", QIcon(":/icons/qbittorrent-tray.svg"))
: QIcon(":/icons/qbittorrent-tray.svg");
#else
const QIcon appLogo(":/icons/skin/qbittorrent-tray.svg");
const QIcon appLogo(":/icons/qbittorrent-tray.svg");
#endif // Q_OS_UNIX
setWindowIcon(appLogo);
#endif // Q_OS_MACOS
@@ -1539,10 +1539,10 @@ void MainWindow::reloadSessionStats()
"qBittorrent"
"</div>"
"<div style='vertical-align: baseline; height: 18px;'>"
"<img src=':/icons/skin/download.svg' height='14'/>&nbsp;%1"
"<img src=':/icons/downloading_small.svg' height='14'/>&nbsp;%1"
"</div>"
"<div style='vertical-align: baseline; height: 18px;'>"
"<img src=':/icons/skin/seeding.svg' height='14'/>&nbsp;%2"
"<img src=':/icons/seeding.svg' height='14'/>&nbsp;%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)));
@@ -1984,18 +1984,18 @@ QIcon MainWindow::getSystrayIcon() const
#else
switch (style) {
case TrayIcon::NORMAL:
return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray.svg"));
return QIcon(QLatin1String(":/icons/qbittorrent-tray.svg"));
case TrayIcon::MONO_DARK:
return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray-dark.svg"));
return QIcon(QLatin1String(":/icons/qbittorrent-tray-dark.svg"));
case TrayIcon::MONO_LIGHT:
return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray-light.svg"));
return QIcon(QLatin1String(":/icons/qbittorrent-tray-light.svg"));
default:
break;
}
#endif
// As a failsafe in case the enum is invalid
return QIcon(QLatin1String(":/icons/skin/qbittorrent-tray.svg"));
return QIcon(QLatin1String(":/icons/qbittorrent-tray.svg"));
}
#endif // Q_OS_MACOS

View File

@@ -1691,7 +1691,7 @@ QString OptionsDialog::webUiPassword() const
void OptionsDialog::webUIHttpsCertChanged(const QString &path, const ShowError showError)
{
m_ui->textWebUIHttpsCert->setSelectedPath(path);
m_ui->lblSslCertStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/qbt-theme/security-low.svg", this, 24));
m_ui->lblSslCertStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/security-low.svg", this, 24));
if (path.isEmpty())
return;
@@ -1709,13 +1709,13 @@ void OptionsDialog::webUIHttpsCertChanged(const QString &path, const ShowError s
return;
}
m_ui->lblSslCertStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/qbt-theme/security-high.svg", this, 24));
m_ui->lblSslCertStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/security-high.svg", this, 24));
}
void OptionsDialog::webUIHttpsKeyChanged(const QString &path, const ShowError showError)
{
m_ui->textWebUIHttpsKey->setSelectedPath(path);
m_ui->lblSslKeyStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/qbt-theme/security-low.svg", this, 24));
m_ui->lblSslKeyStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/security-low.svg", this, 24));
if (path.isEmpty())
return;
@@ -1733,7 +1733,7 @@ void OptionsDialog::webUIHttpsKeyChanged(const QString &path, const ShowError sh
return;
}
m_ui->lblSslKeyStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/qbt-theme/security-high.svg", this, 24));
m_ui->lblSslKeyStatus->setPixmap(Utils::Gui::scaledPixmapSvg(":/icons/security-high.svg", this, 24));
}
void OptionsDialog::showConnectionTab()

View File

@@ -62,14 +62,14 @@ StatusBar::StatusBar(QWidget *parent)
m_connecStatusLblIcon->setFlat(true);
m_connecStatusLblIcon->setFocusPolicy(Qt::NoFocus);
m_connecStatusLblIcon->setCursor(Qt::PointingHandCursor);
m_connecStatusLblIcon->setIcon(QIcon(":/icons/skin/firewalled.svg"));
m_connecStatusLblIcon->setIcon(QIcon(":/icons/firewalled.svg"));
m_connecStatusLblIcon->setToolTip(
QString::fromLatin1("<b>%1</b><br><i>%2</i>").arg(tr("Connection status:")
, tr("No direct connections. This may indicate network configuration problems.")));
connect(m_connecStatusLblIcon, &QAbstractButton::clicked, this, &StatusBar::connectionButtonClicked);
m_dlSpeedLbl = new QPushButton(this);
m_dlSpeedLbl->setIcon(QIcon(":/icons/skin/download.svg"));
m_dlSpeedLbl->setIcon(QIcon(":/icons/downloading_small.svg"));
connect(m_dlSpeedLbl, &QAbstractButton::clicked, this, &StatusBar::capDownloadSpeed);
m_dlSpeedLbl->setFlat(true);
m_dlSpeedLbl->setFocusPolicy(Qt::NoFocus);
@@ -78,7 +78,7 @@ StatusBar::StatusBar(QWidget *parent)
m_dlSpeedLbl->setMinimumWidth(200);
m_upSpeedLbl = new QPushButton(this);
m_upSpeedLbl->setIcon(QIcon(":/icons/skin/seeding.svg"));
m_upSpeedLbl->setIcon(QIcon(":/icons/seeding.svg"));
connect(m_upSpeedLbl, &QAbstractButton::clicked, this, &StatusBar::capUploadSpeed);
m_upSpeedLbl->setFlat(true);
m_upSpeedLbl->setFocusPolicy(Qt::NoFocus);
@@ -173,17 +173,17 @@ void StatusBar::updateConnectionStatus()
const BitTorrent::SessionStatus &sessionStatus = BitTorrent::Session::instance()->status();
if (!BitTorrent::Session::instance()->isListening()) {
m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/skin/disconnected.svg")));
m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/disconnected.svg")));
m_connecStatusLblIcon->setToolTip(QLatin1String("<b>") + tr("Connection Status:") + QLatin1String("</b><br>") + tr("Offline. This usually means that qBittorrent failed to listen on the selected port for incoming connections."));
}
else {
if (sessionStatus.hasIncomingConnections) {
// Connection OK
m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/skin/connected.svg")));
m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/connected.svg")));
m_connecStatusLblIcon->setToolTip(QLatin1String("<b>") + tr("Connection Status:") + QLatin1String("</b><br>") + tr("Online"));
}
else {
m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/skin/firewalled.svg")));
m_connecStatusLblIcon->setIcon(QIcon(QLatin1String(":/icons/firewalled.svg")));
m_connecStatusLblIcon->setToolTip(QLatin1String("<b>") + tr("Connection status:") + QLatin1String("</b><br>") + QLatin1String("<i>") + tr("No direct connections. This may indicate network configuration problems.") + QLatin1String("</i>"));
}
}

View File

@@ -165,40 +165,40 @@ StatusFilterWidget::StatusFilterWidget(QWidget *parent, TransferListWidget *tran
// Add status filters
auto *all = new QListWidgetItem(this);
all->setData(Qt::DisplayRole, tr("All (0)", "this is for the status filter"));
all->setData(Qt::DecorationRole, QIcon(":/icons/skin/filterall.svg"));
all->setData(Qt::DecorationRole, QIcon(":/icons/filterall.svg"));
auto *downloading = new QListWidgetItem(this);
downloading->setData(Qt::DisplayRole, tr("Downloading (0)"));
downloading->setData(Qt::DecorationRole, QIcon(":/icons/skin/downloading.svg"));
downloading->setData(Qt::DecorationRole, QIcon(":/icons/downloading.svg"));
auto *seeding = new QListWidgetItem(this);
seeding->setData(Qt::DisplayRole, tr("Seeding (0)"));
seeding->setData(Qt::DecorationRole, QIcon(":/icons/skin/uploading.svg"));
seeding->setData(Qt::DecorationRole, QIcon(":/icons/uploading.svg"));
auto *completed = new QListWidgetItem(this);
completed->setData(Qt::DisplayRole, tr("Completed (0)"));
completed->setData(Qt::DecorationRole, QIcon(":/icons/skin/completed.svg"));
completed->setData(Qt::DecorationRole, QIcon(":/icons/completed.svg"));
auto *resumed = new QListWidgetItem(this);
resumed->setData(Qt::DisplayRole, tr("Resumed (0)"));
resumed->setData(Qt::DecorationRole, QIcon(":/icons/skin/resumed.svg"));
resumed->setData(Qt::DecorationRole, QIcon(":/icons/resumed.svg"));
auto *paused = new QListWidgetItem(this);
paused->setData(Qt::DisplayRole, tr("Paused (0)"));
paused->setData(Qt::DecorationRole, QIcon(":/icons/skin/paused.svg"));
paused->setData(Qt::DecorationRole, QIcon(":/icons/paused.svg"));
auto *active = new QListWidgetItem(this);
active->setData(Qt::DisplayRole, tr("Active (0)"));
active->setData(Qt::DecorationRole, QIcon(":/icons/skin/filteractive.svg"));
active->setData(Qt::DecorationRole, QIcon(":/icons/filteractive.svg"));
auto *inactive = new QListWidgetItem(this);
inactive->setData(Qt::DisplayRole, tr("Inactive (0)"));
inactive->setData(Qt::DecorationRole, QIcon(":/icons/skin/filterinactive.svg"));
inactive->setData(Qt::DecorationRole, QIcon(":/icons/filterinactive.svg"));
auto *stalled = new QListWidgetItem(this);
stalled->setData(Qt::DisplayRole, tr("Stalled (0)"));
stalled->setData(Qt::DecorationRole, QIcon(":/icons/skin/filterstalled.svg"));
stalled->setData(Qt::DecorationRole, QIcon(":/icons/filterstalled.svg"));
auto *stalledUploading = new QListWidgetItem(this);
stalledUploading->setData(Qt::DisplayRole, tr("Stalled Uploading (0)"));
stalledUploading->setData(Qt::DecorationRole, QIcon(":/icons/skin/stalledUP.svg"));
stalledUploading->setData(Qt::DecorationRole, QIcon(":/icons/stalledUP.svg"));
auto *stalledDownloading = new QListWidgetItem(this);
stalledDownloading->setData(Qt::DisplayRole, tr("Stalled Downloading (0)"));
stalledDownloading->setData(Qt::DecorationRole, QIcon(":/icons/skin/stalledDL.svg"));
stalledDownloading->setData(Qt::DecorationRole, QIcon(":/icons/stalledDL.svg"));
auto *errored = new QListWidgetItem(this);
errored->setData(Qt::DisplayRole, tr("Errored (0)"));
errored->setData(Qt::DecorationRole, QIcon(":/icons/skin/error.svg"));
errored->setData(Qt::DecorationRole, QIcon(":/icons/error.svg"));
const Preferences *const pref = Preferences::instance();
setCurrentRow(pref->getTransSelFilter(), QItemSelectionModel::SelectCurrent);

View File

@@ -727,55 +727,55 @@ QColor getDefaultColorByState(const BitTorrent::TorrentState state)
QIcon getPausedIcon()
{
static QIcon cached = QIcon(":/icons/skin/paused.svg");
static QIcon cached = QIcon(":/icons/paused.svg");
return cached;
}
QIcon getQueuedIcon()
{
static QIcon cached = QIcon(":/icons/skin/queued.svg");
static QIcon cached = QIcon(":/icons/queued.svg");
return cached;
}
QIcon getDownloadingIcon()
{
static QIcon cached = QIcon(":/icons/skin/downloading.svg");
static QIcon cached = QIcon(":/icons/downloading.svg");
return cached;
}
QIcon getStalledDownloadingIcon()
{
static QIcon cached = QIcon(":/icons/skin/stalledDL.svg");
static QIcon cached = QIcon(":/icons/stalledDL.svg");
return cached;
}
QIcon getUploadingIcon()
{
static QIcon cached = QIcon(":/icons/skin/uploading.svg");
static QIcon cached = QIcon(":/icons/uploading.svg");
return cached;
}
QIcon getStalledUploadingIcon()
{
static QIcon cached = QIcon(":/icons/skin/stalledUP.svg");
static QIcon cached = QIcon(":/icons/stalledUP.svg");
return cached;
}
QIcon getCompletedIcon()
{
static QIcon cached = QIcon(":/icons/skin/completed.svg");
static QIcon cached = QIcon(":/icons/completed.svg");
return cached;
}
QIcon getCheckingIcon()
{
static QIcon cached = QIcon(":/icons/skin/checking.svg");
static QIcon cached = QIcon(":/icons/checking.svg");
return cached;
}
QIcon getErrorIcon()
{
static QIcon cached = QIcon(":/icons/skin/error.svg");
static QIcon cached = QIcon(":/icons/error.svg");
return cached;
}

View File

@@ -865,7 +865,7 @@ void TransferListWidget::displayListMenu(const QPoint &)
connect(actionDelete, &QAction::triggered, this, &TransferListWidget::softDeleteSelectedTorrents);
auto *actionPreviewFile = new QAction(UIThemeManager::instance()->getIcon("view-preview"), tr("Preview file..."), listMenu);
connect(actionPreviewFile, &QAction::triggered, this, &TransferListWidget::previewSelectedTorrents);
auto *actionSetMaxRatio = new QAction(QIcon(QLatin1String(":/icons/skin/ratio.svg")), tr("Limit share ratio..."), listMenu);
auto *actionSetMaxRatio = new QAction(QIcon(QLatin1String(":/icons/ratio.svg")), tr("Limit share ratio..."), listMenu);
connect(actionSetMaxRatio, &QAction::triggered, this, &TransferListWidget::setMaxRatioSelectedTorrents);
auto *actionSetUploadLimit = new QAction(UIThemeManager::instance()->getIcon("kt-set-max-upload-speed"), tr("Limit upload rate..."), listMenu);
connect(actionSetUploadLimit, &QAction::triggered, this, &TransferListWidget::setUpLimitSelectedTorrents);