Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

API Documentation

Documentation for developing SailfishOS applications
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Properties
  • Detailed Description

Icon QML Type

A monochrome icon More...

Import Statement: import Sailfish.Silica 1.0
  • List of all members, including inherited members

Properties

  • color : color
  • highlightColor : color
  • highlighted : bool
  • palette : Palette

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

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.


  • Legal
  • Contact Us
  • Jollyboys Ltd © 2024

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn