mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-01-05 22:57:25 +03:00
commit
824b90b643
6 changed files with 61 additions and 62 deletions
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -16,16 +16,6 @@
|
|||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../icons.qrc">:/icons/qbt-theme/application-rss+xml.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
|
@ -66,6 +56,9 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QLabel" name="rssIcon"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
|
|
@ -144,9 +144,9 @@
|
|||
<td class="statusBarSeparator"></td>
|
||||
<td style="cursor:pointer;"><img id="alternativeSpeedLimits" alt="QBT_TR(Alternative speed limits)QBT_TR" src="images/slow_off.png" /></td>
|
||||
<td class="statusBarSeparator"></td>
|
||||
<td class="speedLabel"><img src="images/skin/download.png" alt="" style="padding-right: 5px; margin-bottom: -4px;"><span id="DlInfos"></span></td>
|
||||
<td class="speedLabel"><img src="images/skin/download.png" alt="" style="height: 1.4em; padding-right: 5px; margin-bottom: -4px;"><span id="DlInfos"></span></td>
|
||||
<td class="statusBarSeparator"></td>
|
||||
<td class="speedLabel"><img src="images/skin/seeding.png" alt="" style="padding-right: 5px; margin-bottom: -3px;"><span id="UpInfos"></span></td>
|
||||
<td class="speedLabel"><img src="images/skin/seeding.png" alt="" style="height: 1.4em; padding-right: 5px; margin-bottom: -3px;"><span id="UpInfos"></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -428,6 +428,6 @@ div.toolbox.divider { /* Have to specify div here for IE6's sake */
|
|||
}
|
||||
|
||||
td.speedLabel {
|
||||
cursor:pointer;
|
||||
cursor: pointer;
|
||||
min-width: 18em;
|
||||
}
|
Loading…
Reference in a new issue