aboutsummaryrefslogtreecommitdiffstats
path: root/doc/reference/modules/freedesktop-module.qdoc
diff options
context:
space:
mode:
authorRoman Telezhynskyi <[email protected]>2024-09-24 14:50:44 +0300
committerRoman Telezhynskyi <[email protected]>2024-09-27 07:56:49 +0000
commit1215ead5f1268b69336f3cc829ba378fe20d9adc (patch)
tree3ac32e236b0be1253128a266705dabf509071b3a /doc/reference/modules/freedesktop-module.qdoc
parentf11286e73dddc95df07ef930138d78eb9655cd19 (diff)
Expand freedesktop module's support for hicolor icon theme
Introduces new property freedesktop.hicolorRoot. Changes behavior of freedesktop.appIcon file tag. Allows to copy app icons to hicolor icon theme. Fixes: QBS-1806 Change-Id: I1b55827ebdcb298f694706feb0821d95220e9100 Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'doc/reference/modules/freedesktop-module.qdoc')
-rw-r--r--doc/reference/modules/freedesktop-module.qdoc39
1 files changed, 35 insertions, 4 deletions
diff --git a/doc/reference/modules/freedesktop-module.qdoc b/doc/reference/modules/freedesktop-module.qdoc
index 5b6b14d0f..d3a417010 100644
--- a/doc/reference/modules/freedesktop-module.qdoc
+++ b/doc/reference/modules/freedesktop-module.qdoc
@@ -74,9 +74,19 @@
'X-Application-Version': product.version,
})
- // Declare the application icon
+ // Define the source directory for application icons
+ freedesktop.hicolorRoot: project.sourceDirectory + "/icons/"
+
+ // Declare the application icons
Group {
- files: "icons/my-application.svg"
+ prefix: project.sourceDirectory + "/icons/"
+ files: [
+ "32x32/apps/my-application.png",
+ "32x32@2/apps/my-application.png",
+ "32x32/mimetypes/application-format.png",
+ ...
+ "scalable/apps/my-application.svg",
+ ]
fileTags: "freedesktop.appIcon"
}
}
@@ -113,8 +123,14 @@
\li \c{"freedesktop.appIcon"}
\li -
\li 1.16
- \li Source files with this tag are application icons and will be
- installed under \l{qbs::}{installPrefix}\c{/share/icons/hicolor/scalable/apps}
+ \li Source files with this tag are application icons compliant with the
+ \l{https://specifications.freedesktop.org/icon-theme-spec/}{freedesktop.org Icon Theme Specification}.
+ These icons will be installed under \l{qbs::}{installPrefix}\c{/share/icons/hicolor} in their
+ respective resolution-based directories (e.g., \c{48x48/apps/}, \c{256x256/apps/}),
+ ensuring compatibility with desktop environments following this specification.
+
+ \note After Qbs version 2.5, the \c{hicolorRoot} property must be set to define the source directory for
+ these icons. Without setting this property, icons will not be installed.
\endtable
*/
@@ -138,3 +154,18 @@
\nodefaultvalue
*/
+
+/*!
+ \qmlproperty string freedesktop::hicolorRoot
+
+ Defines the source directory for application icons, which are installed
+ according to the \l{https://specifications.freedesktop.org/icon-theme-spec/}{freedesktop.org Icon Theme Specification}.
+ It is used with the \c{freedesktop.appIcon} tag to install icons into the
+ \c{share/icons/hicolor} directory structure (e.g., \c{48x48/apps/}, \c{256x256/apps/}).
+
+ If \c{hicolorRoot} is not set, icons will not be installed. Set this property
+ to the path containing your icon files.
+
+ \nodefaultvalue
+ \since 2.5
+*/