appdata: Replace named display_length with constant values

The named values for <display_length> were removed in Appstream 1.0,
released recently.  In their place, use integer values.

For the <requires> block, attempt to encode the same reasonableness
restrictions as are enforced on the windowsize setting. The code
requires the height to be at least 480px and the width at least 500px,
but there is no way to specify width versus height, just shortest versus
longest edge, so I just require that the shortest edge is at least
500px.

For the <recommends> block, 768px is the suggested number in the
appstream specification for laptops and tablets.

005c5f104d
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length
This commit is contained in:
Will Thompson 2024-02-17 18:16:08 +00:00
parent c5aa6b3a87
commit dd6f7b3336

View file

@ -168,10 +168,11 @@
<control>keyboard</control>
<control>pointing</control>
<control>touch</control>
<display_length compare="ge">medium</display_length>
<display_length compare="ge">768</display_length>
</recommends>
<requires>
<display_length compare="ge">small</display_length>
<display_length compare="ge">500</display_length>
<display_length compare="le">32000</display_length>
</requires>
<translation type="gettext">tuxpaint</translation>
<launchable type="desktop-id">tuxpaint.desktop</launchable>