On 01/07/2014 05:29 AM, Nick Dedekind wrote: > On 07/01/14 11:00, Michael Zanetti wrote: >> On Tuesday 07 January 2014 10:48:22 Victor Palau wrote: ... >>>> On Tuesday 07 January 2014 10:02:21 Victor Palau wrote: >>>>> Hi, >>>>> >>>>> I have a question about the icon component: >>>>> http://developer.ubuntu.com/api/qml/sdk-1.0/Ubuntu.Components.Icon/ >>>>> >>>>> I have tried the example code: >>>>> >>>>> Icon { >>>>> >>>>> width: 64 >>>>> height: 64 >>>>> name: "search" >>>>> >>>>> } >>>>> >>>>> and it does give me a maginifying glass image, however it kind of doesnt >>>>> look like an Icon that seems to match with the look and feel of the rest >>>> of >>>> >>>>> the Ubuntu design - Does anyone know where the icon is coming from? >>>>> >>>>> Also, how do I know that other "name"s I can use? I didn't manage to >>>>> find >>>>> any documentation pointing me to them. >>>>> >>>>> Thanks, >>>>> >>>>> Victor >> > If you're just testing on the desktop for eventual deployment on phone, > you can override the theme by setting a Qt env variable when you run the > app. > DESKTOP_SESSION=ubuntu-mobile > > You need to manually install the ubuntu-mobile-icon package on desktop, > as they aren't installed with sdk. > /usr/share/icons/ubuntu-mobile >
Is there a trick to using this with ToolbarButton? Right now, it seems to only
support something like:
iconSource: Qt.resolvedUrl(...)
Looking at askubuntu.com[1], this turns into something like:
ToolbarButton {
text: i18n.tr("Refresh")
iconSource:
Qt.resolvedUrl("/usr/share/icons/ubuntu-mobile/actions/scalable/reload.svg")
}
It is rather awkward to have to specify the full path like this. I hoped
something like this might work:
ToolbarButton {
text: i18n.tr("Refresh")
iconSource: "reload"
}
Then run with:
DESKTOP_SESSION=ubuntu-mobile qmlscene /path/to/file.qml
but that doesn't work.
[1]http://askubuntu.com/questions/289747/are-there-any-standard-icons-for-qml-app-development
--
Jamie Strandboge http://www.ubuntu.com/
signature.asc
Description: OpenPGP digital signature
-- Mailing list: https://launchpad.net/~ubuntu-phone Post to : [email protected] Unsubscribe : https://launchpad.net/~ubuntu-phone More help : https://help.launchpad.net/ListHelp

