ColorTheme

Since: BlackBerry 10.0.0

#include <bb/cascades/ColorTheme>

A class representing the color configurations of the theme.

The style property specifies the VisualStyle that represents the color of the theme (Bright or Dark). The primary() and primaryBase() functions return the brand colors for the app. You can read the ColorTheme for an app using the Application::themeSupport property.


Overview

Properties Index

Properties

QVariant primary[read-only]

Specifies the global primary color of the application.

Since:

BlackBerry 10.3.0

QVariant primaryBase[read-only]

Specifies the global primary base color of the application.

The primary color along with the primaryBase color (also known as the brand colors) are used by the framework to provide accents on the UI components. This property reflects the global primary base color and it's recommended to use UIPalette::primaryBase instead for getting the correct color value within the current context.

Typically the primary base color is specified in the bar-descriptor, but it is also possible to change it at run-time by calling ThemeSupport::setPrimaryColor() or ThemeSupport::setVisualStyleAndPrimaryColor().

Since:

BlackBerry 10.3.0

bb::cascades::VisualStyle::Type style[read-only]

Specifies the current VisualStyle used in the ColorTheme.

Since:

BlackBerry 10.0.0

Public Functions

bb::cascades::Color primary ()

Retrieves the global primary color for the application.

This reflects the global primary color and whenever possible it's recommended to use UIPalette::primary() instead for getting the correct color value within the current context.

Return:

The global primary color for the application.

Since:

BlackBerry 10.3.0

bb::cascades::Color primaryBase ()

Retrieves the global primary base color for the application.

This reflects the global primary base color and whenever possible it's recommended to use UIPalette::primaryBase() instead for getting the correct color value within the current context.

Return:

The global primary base color for the application.

Since:

BlackBerry 10.3.0

bb::cascades::VisualStyle::Type style ()

Retrieves the VisualStyle for the theme.

Return:

The application's VisualStyle.

Since:

BlackBerry 10.0.0

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus