Icon QML Type
A monochrome icon More...
Import Statement: | import Sailfish.Silica 1.0 |
Properties
Detailed Description
The Icon type provides a Sailfish-styled monochrome icon. The default color and highlight color are set according to the current ambience.
The icon source is simply set with the source property:
import Sailfish.Silica 1.0
Icon {
source: "image://icon-m-ambience"
}
The color of the icon can be changed using the color property. When choosing different colors it is recommended that the values exposed by the palette property are used. For example:
import Sailfish.Silica 1.0
Icon {
source: "image://icon-m-ambience"
color: palette.highlightColor
}
See the Theme documentation for guidelines on styling text colors and sizes in Sailfish OS.
Icon inherits the QtQuick Image type, so any properties, signals and methods of Text are also available to Icon objects. See the Image documentation for its full list of available properties, signals and methods.
Property Documentation
Specifies whether an icon should appear highlighted.
By default an icon will be highlighted when a control it is a member of is highlighted.
The icon's color palette.
If one or more of a parent control's {SilicaControl::palette}{palette} colors have been overridden those changes will be reflected here. Otherwise the values will follow the equivalent Theme color properties.