diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-03-28 18:58:47 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2022-03-29 14:52:16 +0200 |
commit | de5fb62f32cfd8585cf9d038bf95daa806070a4a (patch) | |
tree | 61b0e4f965ad0fa890e71b155ac80d6b2fe41303 /examples | |
parent | 9d506701b5a37ccd04eb40b56af7ff94c15e9f99 (diff) |
PDF widget example: switch to SVG icons
They look better on high-dpi displays, and come mostly from the KDE
Oxygen theme, except that document-open.svgz is from
https://commons.wikimedia.org/wiki/File:Gnome-fs-directory.svg
For future reference: Nuvola icons have a similar style
https://commons.wikimedia.org/wiki/Category:Nuvola_SVG_icons
The UI file also has icon theme names specified now, so the icons
ought to come from the system theme if one is set, and fall back to
the SVG resources otherwise.
Change-Id: I6d50f143c9d1f24e0ba87ea1506c1a35a47588d8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'examples')
22 files changed, 38 insertions, 22 deletions
diff --git a/examples/pdfwidgets/pdfviewer/CMakeLists.txt b/examples/pdfwidgets/pdfviewer/CMakeLists.txt index 00fb1c4ae..cae762131 100644 --- a/examples/pdfwidgets/pdfviewer/CMakeLists.txt +++ b/examples/pdfwidgets/pdfviewer/CMakeLists.txt @@ -33,14 +33,17 @@ target_link_libraries(pdfviewerwidgets PUBLIC # Resources: set(resources_resource_files - "images/busy.png" - "images/fileopen.png" - "images/go-next-24.png" - "images/go-previous-24.png" - "images/zoom-in-24.png" - "images/zoom-in-32.png" - "images/zoom-out-24.png" - "images/zoom-out-32.png" + "images/zoom-fit-width.svgz" + "images/zoom-in.svgz" + "images/go-previous-view-page.svgz" + "images/zoom-original.svgz" + "images/go-previous-view.svgz" + "images/go-next-view-page.svgz" + "images/zoom-fit-best.svgz" + "images/zoom-out.svgz" + "images/zoom-previous.svgz" + "images/document-open.svgz" + "images/go-next-view.svgz" ) qt_add_resources(pdfviewerwidgets "resources" diff --git a/examples/pdfwidgets/pdfviewer/images/busy.png b/examples/pdfwidgets/pdfviewer/images/busy.png Binary files differdeleted file mode 100644 index 69056c479..000000000 --- a/examples/pdfwidgets/pdfviewer/images/busy.png +++ /dev/null diff --git a/examples/pdfwidgets/pdfviewer/images/document-open.svgz b/examples/pdfwidgets/pdfviewer/images/document-open.svgz Binary files differnew file mode 100644 index 000000000..5ddde5981 --- /dev/null +++ b/examples/pdfwidgets/pdfviewer/images/document-open.svgz diff --git a/examples/pdfwidgets/pdfviewer/images/fileopen.png b/examples/pdfwidgets/pdfviewer/images/fileopen.png Binary files differdeleted file mode 100644 index 33e0d6394..000000000 --- a/examples/pdfwidgets/pdfviewer/images/fileopen.png +++ /dev/null diff --git a/examples/pdfwidgets/pdfviewer/images/go-next-24.png b/examples/pdfwidgets/pdfviewer/images/go-next-24.png Binary files differdeleted file mode 100644 index 9a55ef3d8..000000000 --- a/examples/pdfwidgets/pdfviewer/images/go-next-24.png +++ /dev/null diff --git a/examples/pdfwidgets/pdfviewer/images/go-next-view-page.svgz b/examples/pdfwidgets/pdfviewer/images/go-next-view-page.svgz Binary files differnew file mode 100644 index 000000000..e7f7bece4 --- /dev/null +++ b/examples/pdfwidgets/pdfviewer/images/go-next-view-page.svgz diff --git a/examples/pdfwidgets/pdfviewer/images/go-next-view.svgz b/examples/pdfwidgets/pdfviewer/images/go-next-view.svgz Binary files differnew file mode 100644 index 000000000..2f86541cc --- /dev/null +++ b/examples/pdfwidgets/pdfviewer/images/go-next-view.svgz diff --git a/examples/pdfwidgets/pdfviewer/images/go-previous-24.png b/examples/pdfwidgets/pdfviewer/images/go-previous-24.png Binary files differdeleted file mode 100644 index 2ea769eb8..000000000 --- a/examples/pdfwidgets/pdfviewer/images/go-previous-24.png +++ /dev/null diff --git a/examples/pdfwidgets/pdfviewer/images/go-previous-view-page.svgz b/examples/pdfwidgets/pdfviewer/images/go-previous-view-page.svgz Binary files differnew file mode 100644 index 000000000..f4df6df40 --- /dev/null +++ b/examples/pdfwidgets/pdfviewer/images/go-previous-view-page.svgz diff --git a/examples/pdfwidgets/pdfviewer/images/go-previous-view.svgz b/examples/pdfwidgets/pdfviewer/images/go-previous-view.svgz Binary files differnew file mode 100644 index 000000000..688f55ffe --- /dev/null +++ b/examples/pdfwidgets/pdfviewer/images/go-previous-view.svgz diff --git a/examples/pdfwidgets/pdfviewer/images/zoom-fit-best.svgz b/examples/pdfwidgets/pdfviewer/images/zoom-fit-best.svgz Binary files differnew file mode 100644 index 000000000..0cb1b3074 --- /dev/null +++ b/examples/pdfwidgets/pdfviewer/images/zoom-fit-best.svgz diff --git a/examples/pdfwidgets/pdfviewer/images/zoom-fit-width.svgz b/examples/pdfwidgets/pdfviewer/images/zoom-fit-width.svgz Binary files differnew file mode 100644 index 000000000..a467f6eae --- /dev/null +++ b/examples/pdfwidgets/pdfviewer/images/zoom-fit-width.svgz diff --git a/examples/pdfwidgets/pdfviewer/images/zoom-in-24.png b/examples/pdfwidgets/pdfviewer/images/zoom-in-24.png Binary files differdeleted file mode 100644 index d29b142b6..000000000 --- a/examples/pdfwidgets/pdfviewer/images/zoom-in-24.png +++ /dev/null diff --git a/examples/pdfwidgets/pdfviewer/images/zoom-in-32.png b/examples/pdfwidgets/pdfviewer/images/zoom-in-32.png Binary files differdeleted file mode 100644 index 34d70af37..000000000 --- a/examples/pdfwidgets/pdfviewer/images/zoom-in-32.png +++ /dev/null diff --git a/examples/pdfwidgets/pdfviewer/images/zoom-in.svgz b/examples/pdfwidgets/pdfviewer/images/zoom-in.svgz Binary files differnew file mode 100644 index 000000000..21d6c2ab2 --- /dev/null +++ b/examples/pdfwidgets/pdfviewer/images/zoom-in.svgz diff --git a/examples/pdfwidgets/pdfviewer/images/zoom-original.svgz b/examples/pdfwidgets/pdfviewer/images/zoom-original.svgz Binary files differnew file mode 100644 index 000000000..afa79db19 --- /dev/null +++ b/examples/pdfwidgets/pdfviewer/images/zoom-original.svgz diff --git a/examples/pdfwidgets/pdfviewer/images/zoom-out-24.png b/examples/pdfwidgets/pdfviewer/images/zoom-out-24.png Binary files differdeleted file mode 100644 index 19703474f..000000000 --- a/examples/pdfwidgets/pdfviewer/images/zoom-out-24.png +++ /dev/null diff --git a/examples/pdfwidgets/pdfviewer/images/zoom-out-32.png b/examples/pdfwidgets/pdfviewer/images/zoom-out-32.png Binary files differdeleted file mode 100644 index b83220661..000000000 --- a/examples/pdfwidgets/pdfviewer/images/zoom-out-32.png +++ /dev/null diff --git a/examples/pdfwidgets/pdfviewer/images/zoom-out.svgz b/examples/pdfwidgets/pdfviewer/images/zoom-out.svgz Binary files differnew file mode 100644 index 000000000..b6db7a144 --- /dev/null +++ b/examples/pdfwidgets/pdfviewer/images/zoom-out.svgz diff --git a/examples/pdfwidgets/pdfviewer/images/zoom-previous.svgz b/examples/pdfwidgets/pdfviewer/images/zoom-previous.svgz Binary files differnew file mode 100644 index 000000000..ad4c29215 --- /dev/null +++ b/examples/pdfwidgets/pdfviewer/images/zoom-previous.svgz diff --git a/examples/pdfwidgets/pdfviewer/mainwindow.ui b/examples/pdfwidgets/pdfviewer/mainwindow.ui index 2651525a5..1164243f6 100644 --- a/examples/pdfwidgets/pdfviewer/mainwindow.ui +++ b/examples/pdfwidgets/pdfviewer/mainwindow.ui @@ -188,8 +188,8 @@ <widget class="QStatusBar" name="statusBar"/> <action name="actionOpen"> <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/icons/images/fileopen.png</normaloff>:/icons/images/fileopen.png</iconset> + <iconset theme="document-open" resource="resources.qrc"> + <normaloff>:/icons/images/document-open.svgz</normaloff>:/icons/images/document-open.svgz</iconset> </property> <property name="text"> <string>Open...</string> @@ -199,6 +199,9 @@ </property> </action> <action name="actionQuit"> + <property name="icon"> + <iconset theme="application-exit"/> + </property> <property name="text"> <string>Quit</string> </property> @@ -207,6 +210,9 @@ </property> </action> <action name="actionAbout"> + <property name="icon"> + <iconset theme="help-about"/> + </property> <property name="text"> <string>About</string> </property> @@ -218,8 +224,8 @@ </action> <action name="actionZoom_In"> <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/icons/images/zoom-in-24.png</normaloff>:/icons/images/zoom-in-24.png</iconset> + <iconset theme="zoom-in" resource="resources.qrc"> + <normaloff>:/icons/images/zoom-in.svgz</normaloff>:/icons/images/zoom-in.svgz</iconset> </property> <property name="text"> <string>Zoom In</string> @@ -230,8 +236,8 @@ </action> <action name="actionZoom_Out"> <property name="icon"> - <iconset resource="resources.qrc"> - <normaloff>:/icons/images/zoom-out-24.png</normaloff>:/icons/images/zoom-out-24.png</iconset> + <iconset theme="zoom-out" resource="resources.qrc"> + <normaloff>:/icons/images/zoom-out.svgz</normaloff>:/icons/images/zoom-out.svgz</iconset> </property> <property name="text"> <string>Zoom Out</string> @@ -241,6 +247,10 @@ </property> </action> <action name="actionPrevious_Page"> + <property name="icon"> + <iconset theme="go-previous-view-page" resource="resources.qrc"> + <normaloff>:/icons/images/go-previous-view-page.svgz</normaloff>:/icons/images/go-previous-view-page.svgz</iconset> + </property> <property name="text"> <string>Previous Page</string> </property> @@ -249,6 +259,10 @@ </property> </action> <action name="actionNext_Page"> + <property name="icon"> + <iconset theme="go-next-view-page" resource="resources.qrc"> + <normaloff>:/icons/images/go-next-view-page.svgz</normaloff>:/icons/images/go-next-view-page.svgz</iconset> + </property> <property name="text"> <string>Next Page</string> </property> diff --git a/examples/pdfwidgets/pdfviewer/resources.qrc b/examples/pdfwidgets/pdfviewer/resources.qrc index 02d9655b4..db77763d2 100644 --- a/examples/pdfwidgets/pdfviewer/resources.qrc +++ b/examples/pdfwidgets/pdfviewer/resources.qrc @@ -1,12 +1,11 @@ <RCC> <qresource prefix="/icons"> - <file>images/fileopen.png</file> - <file>images/go-next-24.png</file> - <file>images/go-previous-24.png</file> - <file>images/zoom-in-24.png</file> - <file>images/zoom-in-32.png</file> - <file>images/zoom-out-24.png</file> - <file>images/zoom-out-32.png</file> - <file>images/busy.png</file> + <file>images/document-open.svgz</file> + <file>images/go-next-view.svgz</file> + <file>images/go-previous-view.svgz</file> + <file>images/go-next-view-page.svgz</file> + <file>images/go-previous-view-page.svgz</file> + <file>images/zoom-in.svgz</file> + <file>images/zoom-out.svgz</file> </qresource> </RCC> |