Icon QML Type

A monochrome icon. Подробнее...

Строка импорта: import Sailfish.Silica 1.0
Наследуется от: Image

Свойства

Подробное описание

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. Например:

 import Sailfish.Silica 1.0

 Icon {
     source: "image://icon-m-ambience"
     color: palette.highlightColor
 }

Дополнительную информацию о выборе цвета и размера для текста в ОС Аврора можно получить в описании типа Theme.

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.

Описание свойств

color : color

Specifies the color of the icon.

By default an icon has the color palette.primaryColor.

highlightColor : color

Specifies the color of the icon when it is highlighted.

By default a highlighted icon has the color palette.highlightColor.

highlighted : bool

Specifies whether an icon should appear highlighted.

By default an icon will be highlighted when a control it is a member of is highlighted.

palette : Palette

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.