From 22acbf2077fdf6da5e35ce684e7c720468ad4d37 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 8 Sep 2021 14:40:56 +0100 Subject: [PATCH] spec: Mention the already-supported scale attribute of MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As I understand it, these changes just document the existing semantics and don’t change anything. Signed-off-by: Philip Withnall --- docs/xml/collection-xmldata.xml | 13 ++++++++++++- docs/xml/metainfo-component.xml | 7 ++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/xml/collection-xmldata.xml b/docs/xml/collection-xmldata.xml index 0080a4e8..b3db7f4d 100644 --- a/docs/xml/collection-xmldata.xml +++ b/docs/xml/collection-xmldata.xml @@ -270,23 +270,34 @@ stock icons are loaded from stock. The icon name should never include any file-extension or path. - cached icons are loaded from the AppStream icon cache. The icon tag should contain the icon file name, including it's + cached icons are loaded from the AppStream icon cache. The icon tag should contain the icon file name, including its extension. It must not contain a full or relative path to the icon file. + This icon type may have width and height properties. + If targeting a hi-DPI screen, this icon type may have a scale property. local icons are reserved for AppStream data installed by local applications or via 3rd-party application installers. They should specify a full file path. This icon type may have width and height properties. + If targeting a hi-DPI screen, this icon type may have a scale property. remote icons loaded from a remote URL. Currently, only HTTP urls are supported. This icon type should have width and height properties. + If targeting a hi-DPI screen, this icon type may have a scale property. + + + If specified, the scale property is defined as in the + Freedesktop Icon Theme Specification. + It’s an integer value ≥1 indicating how many pixels in the image represent a logical pixel on the display, in each dimension. + This allows icons for hi-DPI screens to be displayed at the same logical size as on lower resolution screens, but without upscaling artifacts. Examples of the different methods to specify an icon: gimp firefox.png +firefox.png https://example.com/icons/foobar.png /usr/share/pixmaps/foobar.png]]> diff --git a/docs/xml/metainfo-component.xml b/docs/xml/metainfo-component.xml index 6a1ef992..69aaf34e 100644 --- a/docs/xml/metainfo-component.xml +++ b/docs/xml/metainfo-component.xml @@ -205,11 +205,16 @@ local icons are loaded from a file in the filesystem. They should specify a full file path. This icon type may have width and height - properties. + properties. If targeting a hi-DPI screen, this icon type may have a scale property. remote icons loaded from a remote URL. Currently, only HTTP/HTTPS urls are supported. This icon type should have width and height properties. + If targeting a hi-DPI screen, this icon type may have a scale property. + + + The semantics of each property in the <icon/> tag are the same as for the <icon/> tag for collections. + See .