Deploying first high-res icons, enabled high-dpi icon scaling

This commit is contained in:
Matthias Koefferlein 2022-09-11 21:07:48 +02:00
parent 4f125d3768
commit 4a241cc36c
7 changed files with 74 additions and 70 deletions

View File

@ -9,8 +9,10 @@
<file alias="align_right.png">images/align_right.png</file> <file alias="align_right.png">images/align_right.png</file>
<file alias="align_top.png">images/align_top.png</file> <file alias="align_top.png">images/align_top.png</file>
<file alias="align_vcenter.png">images/align_vcenter.png</file> <file alias="align_vcenter.png">images/align_vcenter.png</file>
<file alias="back.png">images/back.png</file> <file alias="back_24px.png">images/back_24px.png</file>
<file alias="back_16.png">images/back_16.png</file> <file alias="back_24px@2x.png">images/back_24px@2x.png</file>
<file alias="back_16px.png">images/back_16px.png</file>
<file alias="back_16px@2x.png">images/back_16px@2x.png</file>
<file alias="blue_flag.png">images/blue_flag.png</file> <file alias="blue_flag.png">images/blue_flag.png</file>
<file alias="box.png">images/box.png</file> <file alias="box.png">images/box.png</file>
<file alias="breakpoint.png">images/breakpoint.png</file> <file alias="breakpoint.png">images/breakpoint.png</file>
@ -41,8 +43,10 @@
<file alias="fliph.png">images/fliph.png</file> <file alias="fliph.png">images/fliph.png</file>
<file alias="flipv.png">images/flipv.png</file> <file alias="flipv.png">images/flipv.png</file>
<file alias="folder.png">images/folder.png</file> <file alias="folder.png">images/folder.png</file>
<file alias="forward.png">images/forward.png</file> <file alias="forward_24px.png">images/forward_24px.png</file>
<file alias="forward_16.png">images/forward_16.png</file> <file alias="forward_24px@2x.png">images/forward_24px@2x.png</file>
<file alias="forward_16px.png">images/forward_16px.png</file>
<file alias="forward_16px@2x.png">images/forward_16px@2x.png</file>
<file alias="generalmacroicon.png">images/generalmacroicon.png</file> <file alias="generalmacroicon.png">images/generalmacroicon.png</file>
<file alias="generalmacroiconactive.png">images/generalmacroiconactive.png</file> <file alias="generalmacroiconactive.png">images/generalmacroiconactive.png</file>
<file alias="green_flag.png">images/green_flag.png</file> <file alias="green_flag.png">images/green_flag.png</file>

View File

@ -1437,6 +1437,9 @@ GuiApplication::GuiApplication (int &argc, char **argv)
#if QT_VERSION >= 0x040500 #if QT_VERSION >= 0x040500
setAttribute (Qt::AA_DontShowIconsInMenus, false); setAttribute (Qt::AA_DontShowIconsInMenus, false);
#endif #endif
#if QT_VERSION >= 0x050000
setAttribute (Qt::AA_UseHighDpiPixmaps, true);
#endif
} }
GuiApplication::~GuiApplication () GuiApplication::~GuiApplication ()

View File

@ -4255,8 +4255,8 @@ public:
menu_entries.push_back (lay::separator ("macros_group", at)); menu_entries.push_back (lay::separator ("macros_group", at));
at = "@toolbar.end"; at = "@toolbar.end";
menu_entries.push_back (lay::menu_item ("cm_prev_display_state", "prev_display_state", at, tl::to_string (QObject::tr ("Back<:/back.png>")))); menu_entries.push_back (lay::menu_item ("cm_prev_display_state", "prev_display_state", at, tl::to_string (QObject::tr ("Back<:/back_24px.png>"))));
menu_entries.push_back (lay::menu_item ("cm_next_display_state", "next_display_state", at, tl::to_string (QObject::tr ("Forward<:/forward.png>")))); menu_entries.push_back (lay::menu_item ("cm_next_display_state", "next_display_state", at, tl::to_string (QObject::tr ("Forward<:/forward_24px.png>"))));
menu_entries.push_back (lay::separator ("toolbar_post_navigation_group", at)); menu_entries.push_back (lay::separator ("toolbar_post_navigation_group", at));
} }
}; };

View File

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>BrowserDialog</class> <class>BrowserDialog</class>
<widget class="QDialog" name="BrowserDialog"> <widget class="QDialog" name="BrowserDialog">
@ -13,18 +14,16 @@
<string>Browser</string> <string>Browser</string>
</property> </property>
<layout class="QVBoxLayout"> <layout class="QVBoxLayout">
<property name="margin" >
<number>9</number>
</property>
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<property name="margin" stdset="0">
<number>9</number>
</property>
<item> <item>
<widget class="lay::BrowserPanel" native="1" name="browser" > <widget class="lay::BrowserPanel" name="browser" native="true">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy> <sizepolicy hsizetype="Ignored" vsizetype="Expanding">
<hsizetype>13</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -40,18 +39,18 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout"> <layout class="QHBoxLayout">
<property name="margin" >
<number>0</number>
</property>
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<property name="margin" stdset="0">
<number>0</number>
</property>
<item> <item>
<spacer> <spacer>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>40</width>
<height>20</height> <height>20</height>
@ -78,9 +77,7 @@
<header>layBrowserPanel.h</header> <header>layBrowserPanel.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources/>
<include location="layResources.qrc" />
</resources>
<connections> <connections>
<connection> <connection>
<sender>close_pb</sender> <sender>close_pb</sender>

View File

@ -223,7 +223,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../lay/lay/layResources.qrc"> <iconset resource="../../icons/icons.qrc">
<normaloff>:/find.png</normaloff>:/find.png</iconset> <normaloff>:/find.png</normaloff>:/find.png</iconset>
</property> </property>
<property name="autoRaise"> <property name="autoRaise">
@ -240,7 +240,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../lay/lay/layResources.qrc"> <iconset resource="../../icons/icons.qrc">
<normaloff>:/clear_edit.png</normaloff>:/clear_edit.png</iconset> <normaloff>:/clear_edit.png</normaloff>:/clear_edit.png</iconset>
</property> </property>
<property name="autoRaise"> <property name="autoRaise">
@ -267,8 +267,8 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../lay/lay/layResources.qrc"> <iconset resource="../../icons/icons.qrc">
<normaloff>:/forward.png</normaloff>:/forward.png</iconset> <normaloff>:/forward_24px.png</normaloff>:/forward_24px.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -290,8 +290,8 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../lay/lay/layResources.qrc"> <iconset resource="../../icons/icons.qrc">
<normaloff>:/back.png</normaloff>:/back.png</iconset> <normaloff>:/back_24px.png</normaloff>:/back_24px.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -313,7 +313,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../lay/lay/layResources.qrc"> <iconset resource="../../icons/icons.qrc">
<normaloff>:/home.png</normaloff>:/home.png</iconset> <normaloff>:/home.png</normaloff>:/home.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -352,7 +352,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../lay/lay/layResources.qrc"> <iconset resource="../../icons/icons.qrc">
<normaloff>:/prev_topic.png</normaloff>:/prev_topic.png</iconset> <normaloff>:/prev_topic.png</normaloff>:/prev_topic.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -388,7 +388,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../lay/lay/layResources.qrc"> <iconset resource="../../icons/icons.qrc">
<normaloff>:/find.png</normaloff>:/find.png</iconset> <normaloff>:/find.png</normaloff>:/find.png</iconset>
</property> </property>
<property name="autoRaise"> <property name="autoRaise">
@ -405,7 +405,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../lay/lay/layResources.qrc"> <iconset resource="../../icons/icons.qrc">
<normaloff>:/next_topic.png</normaloff>:/next_topic.png</iconset> <normaloff>:/next_topic.png</normaloff>:/next_topic.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -461,7 +461,7 @@
<string>...</string> <string>...</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../lay/lay/layResources.qrc"> <iconset resource="../../icons/icons.qrc">
<normaloff>:/bookmark.png</normaloff>:/bookmark.png</iconset> <normaloff>:/bookmark.png</normaloff>:/bookmark.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -512,7 +512,7 @@
<tabstop>home_pb</tabstop> <tabstop>home_pb</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="../../lay/lay/layResources.qrc"/> <include location="../../icons/icons.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>

View File

@ -229,7 +229,7 @@ surface.</string>
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/down.png</iconset> <iconset resource="icons.qrc" >:/down.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Ctrl+Down</string> <string>Ctrl+Down</string>
@ -245,7 +245,7 @@ surface.</string>
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/up.png</iconset> <iconset resource="icons.qrc" >:/up.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Ctrl+Up</string> <string>Ctrl+Up</string>
@ -261,7 +261,7 @@ surface.</string>
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/clear.png</iconset> <iconset resource="icons.qrc" >:/clear.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Del</string> <string>Del</string>
@ -277,7 +277,7 @@ surface.</string>
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/add.png</iconset> <iconset resource="icons.qrc" >:/add.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Return</string> <string>Return</string>
@ -586,7 +586,7 @@ For "bottom" mounting, the top PCB layer will be assigned to the last layout lay
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/up.png</iconset> <iconset resource="icons.qrc" >:/up.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Ctrl+Up</string> <string>Ctrl+Up</string>
@ -602,7 +602,7 @@ For "bottom" mounting, the top PCB layer will be assigned to the last layout lay
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/add.png</iconset> <iconset resource="icons.qrc" >:/add.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Return</string> <string>Return</string>
@ -618,7 +618,7 @@ For "bottom" mounting, the top PCB layer will be assigned to the last layout lay
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/down.png</iconset> <iconset resource="icons.qrc" >:/down.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Ctrl+Down</string> <string>Ctrl+Down</string>
@ -634,7 +634,7 @@ For "bottom" mounting, the top PCB layer will be assigned to the last layout lay
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/clear.png</iconset> <iconset resource="icons.qrc" >:/clear.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Del</string> <string>Del</string>
@ -704,7 +704,7 @@ For "bottom" mounting, the top PCB layer will be assigned to the last layout lay
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/down.png</iconset> <iconset resource="icons.qrc" >:/down.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Ctrl+Down</string> <string>Ctrl+Down</string>
@ -720,7 +720,7 @@ For "bottom" mounting, the top PCB layer will be assigned to the last layout lay
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/up.png</iconset> <iconset resource="icons.qrc" >:/up.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Ctrl+Up</string> <string>Ctrl+Up</string>
@ -736,7 +736,7 @@ For "bottom" mounting, the top PCB layer will be assigned to the last layout lay
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/clear.png</iconset> <iconset resource="icons.qrc" >:/clear.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Del</string> <string>Del</string>
@ -752,7 +752,7 @@ For "bottom" mounting, the top PCB layer will be assigned to the last layout lay
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/add.png</iconset> <iconset resource="icons.qrc" >:/add.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Return</string> <string>Return</string>
@ -791,7 +791,7 @@ For "bottom" mounting, the top PCB layer will be assigned to the last layout lay
<string>...</string> <string>...</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/clear.png</iconset> <iconset resource="icons.qrc" >:/clear.png</iconset>
</property> </property>
<property name="shortcut" > <property name="shortcut" >
<string>Del</string> <string>Del</string>
@ -1278,7 +1278,7 @@ Alternatively the transformation (imported to existing layout) can be specified
<string>Next</string> <string>Next</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/forward.png</iconset> <iconset resource="icons.qrc" >:/forward_24px.png</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -1302,7 +1302,7 @@ Alternatively the transformation (imported to existing layout) can be specified
<string>Back</string> <string>Back</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="layResources.qrc" >:/back.png</iconset> <iconset resource="icons.qrc" >:/back_24px.png</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -1461,7 +1461,7 @@ Alternatively the transformation (imported to existing layout) can be specified
<tabstop>cancel_pb</tabstop> <tabstop>cancel_pb</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="layResources.qrc" /> <include location="icons.qrc" />
</resources> </resources>
<connections> <connections>
<connection> <connection>

View File

@ -35,8 +35,8 @@
<string>Back</string> <string>Back</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../../../lay/lay/layResources.qrc"> <iconset resource="../../../../icons/icons.qrc">
<normaloff>:/back.png</normaloff>:/back.png</iconset> <normaloff>:/back_24px.png</normaloff>:/back_24px.png</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -66,8 +66,8 @@
<string>Next</string> <string>Next</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../../../lay/lay/layResources.qrc"> <iconset resource="../../../../icons/icons.qrc">
<normaloff>:/forward.png</normaloff>:/forward.png</iconset> <normaloff>:/forward_24px.png</normaloff>:/forward_24px.png</iconset>
</property> </property>
</widget> </widget>
</item> </item>
@ -938,7 +938,7 @@ Alternatively the transformation (imported to existing layout) can be specified
<tabstop>cancel_pb</tabstop> <tabstop>cancel_pb</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="../../../../lay/lay/layResources.qrc"/> <include location="../../../../icons/icons.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>