[SailfishDevel] IconButtin and highlight with own icons

Kimmo Lindholm Kimmo.Lindholm at eke.fi
Sat May 31 21:36:54 UTC 2014


Solution posted at TJC;

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

-kimmo

From: devel-bounces at lists.sailfishos.org [mailto:devel-bounces at lists.sailfishos.org] On Behalf Of Andrey Kozhevnikov
Sent: Saturday, May 31, 2014 8:52 PM
To: devel at lists.sailfishos.org
Subject: Re: [SailfishDevel] IconButtin and highlight with own icons

icon should be installed in themes icon and cached by themedaemon. theme imageprovider highlighting/coloring it. when you invoking icon as image://theme/icon-name it requesting image from "theme" imageprovider and it doing all internal work for you.
31.05.2014 23:47, Kimmo Lindholm пишет:
Hi,

I'm using IconButton component as the highlight is just what I would like to use to show that corresponding function is active.

But I can't use it with my own icons. They need to me from image://theme to work, or am I doing something wrong here?

This works nicely with stock-icons, e.g.
IconButton {
    icon.source: "image://theme/icon-m-edit"
    highlighted: daa

but if I use my own icon, or that very same icon copied to my app local directory, the highlight does not work anymore. e.g. this does not highlight:
IconButton {
    icon.source: "../icons/icon-m-edit.png"
    highlighted: daa

making this into resource does not work either

IconButton {
    icon.source: "qrc:///icons/icon-m-edit"
    highlighted: daa

-kimmo





_______________________________________________

SailfishOS.org Devel mailing list

To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org<mailto:devel-unsubscribe at lists.sailfishos.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140531/b2dfd1ad/attachment.html>


More information about the Devel mailing list