> Thanks. This was very helpful. I assume these z-values are the same as
Theme.pixelRatio?

Yes.

>> Let say I would like to create my custom set of icons for my app. Is there 
>> any good approach to figure out (in C++), which icon set is used in the 
>> system, which Zx.x?
> dconf /desktop/sailfish/silica/theme_pixel_ratio 

Nowadays Theme class is also exposed in C++ as SilicaTheme:

PKGCONFIG += sailfishsilica
INCLUDEPATH += /usr/include/libsailfishsilica
...
#include <silicatheme.h>
SilicaTheme theme;
qreal pixelRatio = theme.pixelRatio();

It is quite new addition, created pull request to allow it for Store apps:
https://github.com/sailfish-sdk/sdk-harbour-rpmvalidator/pull/78

In theory you could use that to scale application's SVGs on device to target 
pixel ratio as post-install step, unfortunately it is ran as root and thus 
cannot be allowed for Store apps. Then you wouldn't need to hardcode the pixel 
ratios to build time scripts. I'll dig deeper to see what we could do there.

Br,

Joona

________________________________________
From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] 
on behalf of Michal [m...@mkiol.net]
Sent: 22 July 2016 08:25
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] Resolution-independent in-app icons

> dconf /desktop/sailfish/silica/theme_pixel_ratio
> or /desktop/sailfish/silica/theme_icon_subdir

It seems that "/desktop/sailfish/silica/theme_icon_subdir" entry doesn't
exists, but "/desktop/sailfish/silica/theme_pixel_ratio" is ok and I
will stick to it.

Thanks!

br,
Michal
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to