[SailfishDevel] How to make a theme related icon

Lukáš Karas lukas.karas at centrum.cz
Wed Dec 11 08:06:57 UTC 2019


Same approach, different code... I am using solution from Kimmo for doing 
that:

https://together.jolla.com/question/44325/iconbutton-how-to-use-own-icons-with-highlight/

Dne úterý 10. prosince 2019 18:24:40 CET Slava Monich napsal(a):
> 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.c
> pp
> 
> Sample usage:
> 
> https://github.com/monich/harbour-matkakortti/blob/master/qml/MainPage.qml#L
> 11
> 
> 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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20191211/46bbfd9e/attachment.sig>


More information about the Devel mailing list