[SailfishDevel] Custom in-app icons

Kimmo Lindholm Kimmo.Lindholm at eke.fi
Sat Mar 4 16:12:02 UTC 2017


Hi,

You need to make your own iconprovider. Explained here https://together.jolla.com/question/44325/iconbutton-how-to-use-own-icons-with-highlight/ 

-kimmo
-----Original Message-----
From: Devel [mailto:devel-bounces at lists.sailfishos.org] On Behalf Of decon
Sent: 4. maaliskuuta 2017 18:09
To: devel
Subject: [SailfishDevel] Custom in-app icons

Hi,

Does anyone know how to use custom icons (monocrome) with Silica theme highlighting?

If I do as described at https://sailfishos.org/develop/docs/jolla-ambient/ it works with Silica icons, but I have not managed to do it with custom icons. The following code displays the icon, but highlighting does not work when clicking on the icon.

IconButton {
    icon.source: "qrc:/icons/z1.00/icon-m-case-sensitive.png?" + (pressed ?
                                                                                                     Theme.highlightColor :
                                                                                                     Theme.primaryColor)
    onClicked: { console.log("Clicked icon") } }

There were no error messages in the log either.
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org


More information about the Devel mailing list