Merge pull request #6269 from Chocobo1/icons

Fix new icons too large
This commit is contained in:
sledgehammer999 2017-01-20 18:33:35 +02:00 committed by GitHub
commit 824b90b643
6 changed files with 61 additions and 62 deletions

View file

@ -611,6 +611,19 @@ void Utils::Misc::openFolderSelect(const QString &absolutePath)
#endif #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 #endif // DISABLE_GUI
namespace namespace
@ -631,16 +644,6 @@ void Utils::Misc::msleep(unsigned long msecs)
SleeperThread::msleep(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() QString Utils::Misc::osName()
{ {
// static initialization for usage in signal handler // static initialization for usage in signal handler

View file

@ -69,11 +69,6 @@ namespace Utils
void shutdownComputer(const ShutdownDialogAction &action); void shutdownComputer(const ShutdownDialogAction &action);
#ifndef DISABLE_GUI
// Get screen center
QPoint screenCenter(QWidget *win);
QSize smallIconSize();
#endif
QString osName(); QString osName();
QString boostVersionString(); QString boostVersionString();
QString libtorrentVersionString(); QString libtorrentVersionString();
@ -107,6 +102,10 @@ namespace Utils
#ifndef DISABLE_GUI #ifndef DISABLE_GUI
void openPath(const QString& absolutePath); void openPath(const QString& absolutePath);
void openFolderSelect(const QString& absolutePath); void openFolderSelect(const QString& absolutePath);
QPoint screenCenter(QWidget *win);
QSize smallIconSize();
QSize largeIconSize();
#endif #endif
#ifdef Q_OS_WIN #ifdef Q_OS_WIN

View file

@ -30,13 +30,17 @@
#include "rsssettingsdlg.h" #include "rsssettingsdlg.h"
#include "ui_rsssettingsdlg.h" #include "ui_rsssettingsdlg.h"
#include "base/preferences.h" #include "base/preferences.h"
#include "base/utils/misc.h"
#include "guiiconprovider.h"
RssSettingsDlg::RssSettingsDlg(QWidget *parent) : RssSettingsDlg::RssSettingsDlg(QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::RssSettingsDlg) ui(new Ui::RssSettingsDlg)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->rssIcon->setPixmap(GuiIconProvider::instance()->getIcon("application-rss+xml").pixmap(Utils::Misc::largeIconSize()));
// Load settings // Load settings
const Preferences* const pref = Preferences::instance(); const Preferences* const pref = Preferences::instance();
ui->spinRSSRefresh->setValue(pref->getRSSRefreshInterval()); ui->spinRSSRefresh->setValue(pref->getRSSRefreshInterval());

View file

@ -16,16 +16,6 @@
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<layout class="QGridLayout" name="gridLayout"> <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"> <item row="0" column="1">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
@ -66,6 +56,9 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" rowspan="2">
<widget class="QLabel" name="rssIcon"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>

View file

@ -144,9 +144,9 @@
<td class="statusBarSeparator"></td> <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 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="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="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> </tr>
</table> </table>
</div> </div>

View file

@ -6,21 +6,21 @@ Theme: Default
Copyright: Copyright:
Copyright (c) 2007-2009 Greg Houston, <http://greghoustondesign.com/>. Copyright (c) 2007-2009 Greg Houston, <http://greghoustondesign.com/>.
License: License:
MIT-style license. MIT-style license.
Required by: Required by:
Layout.js Layout.js
*/ */
/* Layout /* Layout
---------------------------------------------------------------- */ ---------------------------------------------------------------- */
html, body { html, body {
background: #fff; background: #fff;
} }
body { body {
margin: 0; /* Required */ margin: 0; /* Required */
@ -40,7 +40,7 @@ body {
} }
#desktopTitlebarWrapper { #desktopTitlebarWrapper {
position: relative; position: relative;
height: 45px; height: 45px;
overflow: hidden; overflow: hidden;
background: #718BA6 url(../images/skin/bg-header.gif) repeat-x; background: #718BA6 url(../images/skin/bg-header.gif) repeat-x;
@ -64,10 +64,10 @@ body {
} }
#desktopTitlebar h2.tagline { #desktopTitlebar h2.tagline {
padding: 7px 0 0 0; padding: 7px 0 0 0;
font-family: Verdana, Arial, Helvetica, sans-serif; font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px; font-size: 10px;
color: #d4dce4; color: #d4dce4;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
text-transform: uppercase; text-transform: uppercase;
@ -111,7 +111,7 @@ body {
border-bottom: 1px solid #3f3f3f; border-bottom: 1px solid #3f3f3f;
} }
#desktopNavbar ul { #desktopNavbar ul {
padding: 0; padding: 0;
margin: 0; margin: 0;
list-style: none; list-style: none;
@ -124,8 +124,8 @@ body {
#desktopNavbar a { #desktopNavbar a {
display: block; display: block;
} }
#desktopNavbar ul li a { #desktopNavbar ul li a {
/*padding: 6px 10px 6px 10px;*/ /*padding: 6px 10px 6px 10px;*/
color: #333; color: #333;
@ -143,8 +143,8 @@ body {
#desktopNavbar ul li a.arrow-right, #desktopNavbar ul li a:hover.arrow-right { #desktopNavbar ul li a.arrow-right, #desktopNavbar ul li a:hover.arrow-right {
background-image: url(../images/skin/arrow-right.gif); background-image: url(../images/skin/arrow-right.gif);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: right 7px; background-position: right 7px;
} }
#desktopNavbar li ul { #desktopNavbar li ul {
border: 1px solid #3f3f3f; border: 1px solid #3f3f3f;
@ -192,7 +192,7 @@ body {
#desktopNavbar li ul li a:hover { #desktopNavbar li ul li a:hover {
background: #6C98D9; background: #6C98D9;
color: #fff; color: #fff;
-moz-border-radius: 2px; -moz-border-radius: 2px;
} }
#desktopNavbar li ul li a:hover .check { #desktopNavbar li ul li a:hover .check {
@ -214,9 +214,9 @@ body {
li.divider { li.divider {
margin-top: 2px; margin-top: 2px;
padding-top: 3px; padding-top: 3px;
border-top: 1px solid #ebebeb; border-top: 1px solid #ebebeb;
} }
#pageWrapper { #pageWrapper {
position: relative; position: relative;
@ -253,7 +253,7 @@ li.divider {
/* Columns */ /* Columns */
.column { .column {
position: relative; position: relative;
float: left; float: left;
overflow: hidden; /* Required by IE6 */ overflow: hidden; /* Required by IE6 */
} }
@ -263,45 +263,45 @@ li.divider {
.panel { .panel {
position: relative; position: relative;
overflow: auto; overflow: auto;
background: #f8f8f8; background: #f8f8f8;
border-bottom: 1px solid #b9b9b9; border-bottom: 1px solid #b9b9b9;
} }
.panelWrapper.collapsed .panel-header { .panelWrapper.collapsed .panel-header {
border-bottom: 0; border-bottom: 0;
} }
.panelAlt { .panelAlt {
background: #f2f2f2; background: #f2f2f2;
} }
.bottomPanel { .bottomPanel {
border-bottom: 0; border-bottom: 0;
} }
.pad { .pad {
padding: 8px; padding: 8px;
} }
#mainPanel { #mainPanel {
background: #fff; background: #fff;
} }
.panel-header { .panel-header {
position: relative; position: relative;
background: #f1f1f1 url(../images/skin/bg-panel-header.gif) repeat-x; background: #f1f1f1 url(../images/skin/bg-panel-header.gif) repeat-x;
height: 30px; height: 30px;
overflow: hidden; overflow: hidden;
border-bottom: 1px solid #d3d3d3; border-bottom: 1px solid #d3d3d3;
} }
.panel-headerContent { .panel-headerContent {
padding-top: 2px; padding-top: 2px;
} }
.panel-headerContent.tabs { .panel-headerContent.tabs {
background: url(../images/skin/tabs.gif) repeat-x; background: url(../images/skin/tabs.gif) repeat-x;
background-position: left -68px; background-position: left -68px;
} }
.panel-header h2 { .panel-header h2 {
@ -327,7 +327,7 @@ li.divider {
cursor: pointer; cursor: pointer;
} }
/* Column and Panel Handles */ /* Column and Panel Handles */
.horizontalHandle { .horizontalHandle {
height: 4px; height: 4px;
@ -338,10 +338,10 @@ li.divider {
} }
.horizontalHandle.detached .handleIcon { .horizontalHandle.detached .handleIcon {
background: transparent; background: transparent;
} }
.horizontalHandle .handleIcon { .horizontalHandle .handleIcon {
margin: 0 auto; margin: 0 auto;
height: 4px; height: 4px;
line-height: 1px; line-height: 1px;
@ -351,7 +351,7 @@ li.divider {
} }
.columnHandle { .columnHandle {
min-height: 10px; min-height: 10px;
float: left; float: left;
width: 4px; width: 4px;
overflow: hidden; overflow: hidden;
@ -405,7 +405,7 @@ div.toolbox.divider { /* Have to specify div here for IE6's sake */
.iconWrapper:hover { .iconWrapper:hover {
border: 1px solid #a0a0a0; border: 1px solid #a0a0a0;
-moz-border-radius: 3px; -moz-border-radius: 3px;
} }
#spinnerWrapper { #spinnerWrapper {
@ -428,6 +428,6 @@ div.toolbox.divider { /* Have to specify div here for IE6's sake */
} }
td.speedLabel { td.speedLabel {
cursor:pointer; cursor: pointer;
min-width: 18em; min-width: 18em;
} }