More high-dpi stuff

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2019-03-25 08:56:20 +01:00
parent d1cd153e6c
commit 8fae6d7c68
No known key found for this signature in database
GPG Key ID: CDBAA37ABC74FBA0
13 changed files with 137 additions and 32 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -37,18 +37,16 @@
<file>48x48/carla-control.png</file>
<file>48x48/canvas.png</file>
<file>48x48/folder.png</file>
<file>48x48/jack.png</file>
<file>48x48/juce.png</file>
<file>48x48/osc.png</file>
<file>48x48/warning.png</file>
<file>48x48/wine.png</file>
<file>48x48/carla.png</file>
<file>48x48/carla-control.png</file>
<file>scalable/carla.svg</file>
<file>scalable/carla-control.svg</file>
<file>scalable/folder.svgz</file>
<file>scalable/osc.svgz</file>
<file>scalable/warning.svgz</file>
<file>scalable/wine.svgz</file>
<file>bitmaps/carla_about_black.png</file>
<file>bitmaps/carla_about_white.png</file>

Binary file not shown.

BIN
resources/scalable/osc.svgz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>567</width>
<height>326</height>
<width>686</width>
<height>342</height>
</rect>
</property>
<property name="windowTitle">
@ -243,7 +243,7 @@
<property name="maximumSize">
<size>
<width>22</width>
<height>16777215</height>
<height>22</height>
</size>
</property>
<property name="text">
@ -252,6 +252,9 @@
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-ok-apply.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
@ -259,7 +262,7 @@
<property name="maximumSize">
<size>
<width>22</width>
<height>16777215</height>
<height>22</height>
</size>
</property>
<property name="text">
@ -268,6 +271,9 @@
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-ok-apply.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1">
@ -293,12 +299,21 @@
</item>
<item row="2" column="0">
<widget class="QLabel" name="ico_posix64">
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-ok-apply.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
@ -306,7 +321,7 @@
<property name="maximumSize">
<size>
<width>22</width>
<height>16777215</height>
<height>22</height>
</size>
</property>
<property name="text">
@ -315,6 +330,9 @@
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-ok-apply.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
@ -329,7 +347,7 @@
<property name="maximumSize">
<size>
<width>22</width>
<height>16777215</height>
<height>22</height>
</size>
</property>
<property name="text">
@ -338,16 +356,28 @@
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-ok-apply.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="ico_win64">
<property name="maximumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-ok-apply.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">

View File

@ -118,7 +118,7 @@
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/48x48/carla.png</normaloff>:/48x48/carla.png</iconset>
<normaloff>:/scalable/carla.svg</normaloff>:/scalable/carla.svg</iconset>
</property>
<property name="flags">
<set>ItemIsSelectable|ItemIsEnabled</set>
@ -178,7 +178,7 @@
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/48x48/osc.png</normaloff>:/48x48/osc.png</iconset>
<normaloff>:/scalable/osc.svgz</normaloff>:/scalable/osc.svgz</iconset>
</property>
<property name="flags">
<set>ItemIsSelectable|ItemIsEnabled</set>
@ -196,7 +196,7 @@
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/48x48/folder.png</normaloff>:/48x48/folder.png</iconset>
<normaloff>:/scalable/folder.svgz</normaloff>:/scalable/folder.svgz</iconset>
</property>
<property name="flags">
<set>ItemIsSelectable|ItemIsEnabled</set>
@ -214,7 +214,7 @@
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/48x48/wine.png</normaloff>:/48x48/wine.png</iconset>
<normaloff>:/scalable/wine.svgz</normaloff>:/scalable/wine.svgz</iconset>
</property>
<property name="flags">
<set>ItemIsSelectable|ItemIsEnabled</set>
@ -232,7 +232,7 @@
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/48x48/warning.png</normaloff>:/48x48/warning.png</iconset>
<normaloff>:/scalable/warning.svgz</normaloff>:/scalable/warning.svgz</iconset>
</property>
<property name="flags">
<set>ItemIsSelectable|ItemIsEnabled</set>
@ -280,11 +280,20 @@
</item>
<item>
<widget class="QLabel" name="label_icon_main">
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/48x48/carla.png</pixmap>
<pixmap resource="../resources.qrc">:/scalable/carla.svg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
@ -323,7 +332,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<iconset>
<normaloff>:/16x16/document-open.png</normaloff>:/16x16/document-open.png</iconset>
</property>
</widget>
@ -1067,6 +1076,9 @@
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-information.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
@ -1141,11 +1153,20 @@
</item>
<item>
<widget class="QLabel" name="label_icon_engine_5">
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/48x48/jack.png</pixmap>
<pixmap resource="../resources.qrc">:/scalable/osc.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
@ -1241,6 +1262,9 @@
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-information.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
@ -1423,6 +1447,9 @@
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-information.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
@ -1498,6 +1525,9 @@
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-information.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
@ -1633,15 +1663,27 @@
</item>
<item>
<widget class="QLabel" name="label_19">
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/48x48/folder.png</pixmap>
<pixmap resource="../resources.qrc">:/scalable/folder.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -1772,6 +1814,9 @@
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-information.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
@ -1941,12 +1986,21 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="label_icon_engine_4">
<widget class="QLabel" name="label_icon_wine">
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/48x48/wine.png</pixmap>
<pixmap resource="../resources.qrc">:/scalable/wine.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
@ -2147,7 +2201,10 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-information.png</pixmap>
<pixmap resource="../resources.qrc">:/16x16/dialog-information.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@ -2235,12 +2292,21 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="label_icon_engine_2">
<widget class="QLabel" name="label_icon_experimental">
<property name="maximumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/48x48/warning.png</pixmap>
<pixmap resource="../resources.qrc">:/scalable/warning.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
@ -2276,11 +2342,17 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="../resources.qrc">:/16x16/dialog-warning.png</pixmap>
<pixmap resource="../resources.qrc">:/16x16/dialog-warning.svgz</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>

View File

@ -1927,8 +1927,13 @@ void CarlaStyle::drawControl(ControlElement element, const QStyleOption *option,
else
pixmap = menuItem->icon.pixmap(iconSize, mode);
int pixw = pixmap.width();
int pixh = pixmap.height();
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
const qreal pixw = static_cast<qreal>(pixmap.width()) / pixmap.devicePixelRatioF();
const qreal pixh = static_cast<qreal>(pixmap.height()) / pixmap.devicePixelRatioF();
#else
const int pixw = pixmap.width();
const int pixh = pixmap.height();
#endif
QRect pmr(0, 0, pixw, pixh);
pmr.moveCenter(vCheckRect.center());

View File

@ -32,12 +32,12 @@
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-register"
# endif
# if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
# if defined(__GNUC__) && __GNUC__ >= 8
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wclass-memaccess"
# endif
# include <QtGui/QCommonStyle>
# if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
# if defined(__GNUC__) && __GNUC__ >= 8
# pragma GCC diagnostic pop
# endif
# ifdef __clang__