mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 08:48:07 -06:00
Fix rss icon too large in rss settings dialog
Give a name to the rss icon (in .ui file) Add helper function: Utils::Misc::largeIconSize() Group functions under the same #ifdef
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user