summaryrefslogtreecommitdiffstats
path: root/src/gui/doc
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2017-01-04 16:27:52 +0100
committerMitch Curtis <mitch.curtis@qt.io>2017-02-01 13:58:01 +0000
commitf299b565b5904e39a47b6133643448e46810f0ed (patch)
tree0620b697a19d6771539d7b36602b28980d5da62c /src/gui/doc
parentf6c17c37ba4e588a8c9a579cfbfb40709fe7cf0e (diff)
Implement support for Scale directory key according to Icon Theme spec
Qt already supports high DPI icons using the “@nx” approach, where the device pixel ratio that the image was designed for is in the file name. However, our implementation of the freedekstop.org Icon Theme specification did not support the Scale directory key: https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#directory_layout This meant that users creating icons via QIcon::fromTheme() did not get high DPI support. This patch fixes that. [ChangeLog][QtGui][QIcon] Implemented support for Scale directory key according to Icon Theme Spec. Icons created via QIcon::fromTheme() now have high DPI support by specifying the Scale in the appropriate entry of the relevant index.theme file. Task-number: QTBUG-49820 Change-Id: If442fbc551034166d88defe607109de1c6ca1d28 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/doc')
-rw-r--r--src/gui/doc/qtgui.qdocconf3
-rw-r--r--src/gui/doc/src/external-resources.qdoc12
-rw-r--r--src/gui/doc/src/includes/qiconengine-virtualhookhelper.qdocinc3
3 files changed, 16 insertions, 2 deletions
diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf
index b07d39fa37..94574a314c 100644
--- a/src/gui/doc/qtgui.qdocconf
+++ b/src/gui/doc/qtgui.qdocconf
@@ -44,7 +44,8 @@ depends += \
headerdirs += ..
sourcedirs += .. \
- ../../../examples/gui/doc/src
+ ../../../examples/gui/doc/src \
+ src/includes
exampledirs += ../../../examples/gui \
snippets
diff --git a/src/gui/doc/src/external-resources.qdoc b/src/gui/doc/src/external-resources.qdoc
index 6a423323ea..480a4057be 100644
--- a/src/gui/doc/src/external-resources.qdoc
+++ b/src/gui/doc/src/external-resources.qdoc
@@ -49,4 +49,14 @@
/*!
\externalpage http://www.opengl.org/wiki/Tessellation_Shader
\title OpenGL Tessellation Shaders
-*/ \ No newline at end of file
+*/
+
+/*!
+ \externalpage https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
+ \title Icon Theme Specification
+*/
+
+/*!
+ \externalpage https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#directory_layout
+ \title Icon Theme Specification - Directory Layout
+*/
diff --git a/src/gui/doc/src/includes/qiconengine-virtualhookhelper.qdocinc b/src/gui/doc/src/includes/qiconengine-virtualhookhelper.qdocinc
new file mode 100644
index 0000000000..b17d2bd66f
--- /dev/null
+++ b/src/gui/doc/src/includes/qiconengine-virtualhookhelper.qdocinc
@@ -0,0 +1,3 @@
+\note This is a helper method and the actual work is done by the
+virtual_hook() method, hence this method depends on icon engine support
+and may not work with all icon engines.