diff --git a/src/base/utils/misc.cpp b/src/base/utils/misc.cpp index 1ec23cafc..611658a03 100644 --- a/src/base/utils/misc.cpp +++ b/src/base/utils/misc.cpp @@ -611,6 +611,19 @@ void Utils::Misc::openFolderSelect(const QString &absolutePath) #endif } +QSize Utils::Misc::smallIconSize() +{ + // Get DPI scaled icon size (device-dependent), see QT source + int s = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); + return QSize(s, s); +} + +QSize Utils::Misc::largeIconSize() +{ + // Get DPI scaled icon size (device-dependent), see QT source + int s = QApplication::style()->pixelMetric(QStyle::PM_LargeIconSize); + return QSize(s, s); +} #endif // DISABLE_GUI namespace @@ -631,16 +644,6 @@ void Utils::Misc::msleep(unsigned long msecs) SleeperThread::msleep(msecs); } -#ifndef DISABLE_GUI -QSize Utils::Misc::smallIconSize() -{ - // Get DPI scaled icon size (device-dependent), see QT source - int s = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); - return QSize(s, s); -} - -#endif - QString Utils::Misc::osName() { // static initialization for usage in signal handler diff --git a/src/base/utils/misc.h b/src/base/utils/misc.h index d0a1c39bb..c0641cd2b 100644 --- a/src/base/utils/misc.h +++ b/src/base/utils/misc.h @@ -69,11 +69,6 @@ namespace Utils void shutdownComputer(const ShutdownDialogAction &action); -#ifndef DISABLE_GUI - // Get screen center - QPoint screenCenter(QWidget *win); - QSize smallIconSize(); -#endif QString osName(); QString boostVersionString(); QString libtorrentVersionString(); @@ -107,6 +102,10 @@ namespace Utils #ifndef DISABLE_GUI void openPath(const QString& absolutePath); void openFolderSelect(const QString& absolutePath); + + QPoint screenCenter(QWidget *win); + QSize smallIconSize(); + QSize largeIconSize(); #endif #ifdef Q_OS_WIN diff --git a/src/gui/rss/rsssettingsdlg.cpp b/src/gui/rss/rsssettingsdlg.cpp index 08acc1d96..44ad9a27f 100644 --- a/src/gui/rss/rsssettingsdlg.cpp +++ b/src/gui/rss/rsssettingsdlg.cpp @@ -30,13 +30,17 @@ #include "rsssettingsdlg.h" #include "ui_rsssettingsdlg.h" + #include "base/preferences.h" +#include "base/utils/misc.h" +#include "guiiconprovider.h" RssSettingsDlg::RssSettingsDlg(QWidget *parent) : QDialog(parent), ui(new Ui::RssSettingsDlg) { ui->setupUi(this); + ui->rssIcon->setPixmap(GuiIconProvider::instance()->getIcon("application-rss+xml").pixmap(Utils::Misc::largeIconSize())); // Load settings const Preferences* const pref = Preferences::instance(); ui->spinRSSRefresh->setValue(pref->getRSSRefreshInterval()); diff --git a/src/gui/rss/rsssettingsdlg.ui b/src/gui/rss/rsssettingsdlg.ui index 4072389d0..b2581f471 100644 --- a/src/gui/rss/rsssettingsdlg.ui +++ b/src/gui/rss/rsssettingsdlg.ui @@ -16,16 +16,6 @@ - - - - - - - :/icons/qbt-theme/application-rss+xml.png - - - @@ -66,6 +56,9 @@ + + +