[SailfishDevel] How to make a theme related icon

Slava Monich slava.monich at jolla.com
Tue Dec 10 17:24:40 UTC 2019


I use this image provider in my Jolla store apps to colorize grayscale 
svgs according to the theme:

https://github.com/monich/harbour-lib/blob/master/src/HarbourImageProvider.cpp

Sample usage:

https://github.com/monich/harbour-matkakortti/blob/master/qml/MainPage.qml#L11

and registration:

https://github.com/monich/harbour-matkakortti/blob/master/src/main.cpp#L117

Cheers,

-Slava


> On light theme, icons is like image.png
>
> On sailfish3 theme, icons is like image.png
>
> What's the magic? I made an icon, it's not work on light theme as expect.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20191210/8808b6a5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 19143 bytes
Desc: not available
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20191210/8808b6a5/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 13248 bytes
Desc: not available
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20191210/8808b6a5/attachment-0003.png>


More information about the Devel mailing list