I am developing a qml-app and I want to put icons on the buttons. I would like to use ubuntu standard icons to get the real ubuntu look for my app. How can I do this?
The official Ubuntu Touch icon theme is called Ubuntu Mobile, and is available for installation in the
To use the icons in your code, just use the path to the icon. For example, to set the icon in a toolbar button, do something similar to this:
To avoid having to repeat the root path over and over again, I usually use a small function called
The previous example would then be:
I've only just started dabbling in QML, but it looks like the Ubuntu SDK provides a way to access icons from the theme, the Icon component. Here's a Hello Worldish example:
This gives you:
AFAICT, this doesn't actually seem to support the full set of icons provided by the Freedesktop Icon Theme Specification though.....
The default theme for Ubuntu mobile is Suru and the icons are located in
Any of the icons can be used by name. Even icons outside the Suru icon set.
If the file is
The code could be:
Which gives you an action button with a heart icon.