Closed Olf0 closed 1 year ago
In the row "Icon" an exhaustive list of possible file formats should be documented (i.e., all possible formats). (AFAIU at least SVG and PNG are supported.
For pixel formats the optimal size (in Px²) should be documented, and also what happens, if a provided icon is smaller or larger than the desired size (e.g., "is automatically scaled to the optimal size").
The Icon:
string is passed as an URL string to the Chum:GUI app, and QML will then load the image in its Image::source
attribute.
Therefore:
Image.PreserveAspectFit
) using the Theme.iconSizeLarge
property of Silica, therefore will differ depending on device resolution. The app "Theme Tool" can be used to show the pixel sizeof that constant, e.g. on X10iii it's 168px.Thank you very much!
While I'm not familiar with whether up- or downscaling will yield better results for icons, if we recommend an image size for raster formats, I guess it should be in the range of 128 < size < 256.
Downscaling always yields better results, for really good results the graphic to downscale should be 1,5x the size to scale down to, for best results factor 2 (assuming the downscale factor is not an integer, then these considerations do not matter).
So I consider recommending (172x172 pixels is the largest icon size SailfishOS requires): The image should be at least 172x172 pixels, the recommended size ranges from 256x256 to 512x512 pixels.
Do I understand correctly that the aspect ratio will always be retained, so if a non-square graphic is linked to it will be displayed in its original aspect ratio. I.e., the write-up may read like this: It is recommended to provide a square graphic (1:1 aspect ratio), but if a non-square one is provided it will be displayed in its original aspect ratio, which may interfere with the layout design.
I really appreciate the links, so (though I consider to drop the last half-sentence): SVG is the preferred format, PNG the recommended bitmap format, BMP, GIF, JPG, PBM, PGM, PPM, XBM, XPM are also supported (see https://doc.qt.io/qt-5/qimagereader.html#supportedImageFormats), and ICNS, JP2, MNG, TGA, TIFF, WBMP, WEBP might be supported (see https://doc.qt.io/qt-5/qtimageformats-index.html).
Fixed by commit 4706988
.
Triggered by https://github.com/sailfishos-chum/sailfishos-chum-gui/issues/7#issuecomment-1012922390 :