Ubuntu.Components.Themes.Palette
Provides the palette of colors from the theme that widgets use to draw themselves. More...
Import Statement: | import Ubuntu.Components.Themes 1.3 |
Inherits: |
Properties
- disabled : PaletteValues
- focused : PaletteValues
- highlighted : PaletteValues
- normal : PaletteValues
- selected : PaletteValues
- selectedDisabled : PaletteValues
Detailed Description
Palette provides access to colors defined by the current theme. The actual color palette to use depends on the state of the widget being drawn.
A color palette (PaletteValues) has various roles to choose from depending on what part of the widget is being drawn (the base of the widget, the foreground, etc.).
For each color there is a corresponding 'text' color that is guaranteed to provide good legibility for text or icons placed on top of a background of the corresponding color.
Example of a Text on top of a background Rectangle:
Item { Rectangle { color: theme.palette.normal.base } Text { color: theme.palette.normal.baseText } }
Property Documentation
disabled : PaletteValues |
Color palette to use when the widget is in the disabled (enabled: false) state.
This QML property was introduced in Ubuntu.Components.Themes 1.3.
focused : PaletteValues |
Color palette to use when the widget is focused.
highlighted : PaletteValues |
Color palette values to use when the widget is highlighted.
This QML property was introduced in Ubuntu.Components.Themes 1.3.
normal : PaletteValues |
Color palette to use when the widget is in the default state.
selected : PaletteValues |
Color palette to use when the widget is selected, for example when a tab is the current one.
selectedDisabled : PaletteValues |
Color palette to use when the widget is selected and disabled.
This QML property was introduced in Ubuntu.Components.Themes 1.3.