It derives from <GObject>.
A class for managing application-wide styling.
<AdwStyleManager> provides a way to query and
influence the application styles, such as whether to use dark style, the
system accent color or high contrast appearance.
It allows to set the color scheme via the
StyleManager:color-scheme property, and to query the current
appearance, as well as whether a system-wide color scheme and accent
color preferences exists.
The current system accent color.
See also StyleManager:accent-color-rgba.
Its value is a <AdwAccentColor>.
It is read only.
The current system accent color as a <GdkRGBA>.
Equivalent to calling AccentColor.to_rgba on the value of
StyleManager:accent-color.
This is a background color. The matching foreground color is white.
Its value is a <GdkRGBA>, or #f.
It is read only.
The requested application color scheme.
The effective appearance will be decided based on the application color
scheme and the system preferred color scheme. The
StyleManager:dark property can be used to query the current
effective appearance.
The Adw.ColorScheme.prefer-light color scheme results in the
application using light appearance unless the system prefers dark
colors. This is the default value.
The Adw.ColorScheme.prefer-dark color scheme results in the
application using dark appearance, but can still switch to the light
appearance if the system can prefers it, for example, when the high
contrast preference is enabled.
The Adw.ColorScheme.force-light and
Adw.ColorScheme.force-dark values ignore the system preference
entirely. They are useful if the application wants to match its UI to
its content or to provide a separate color scheme switcher.
If a per-<GdkDisplay> style manager has its
color scheme set to Adw.ColorScheme.default, it will inherit the
color scheme from the default style manager.
For the default style manager, Adw.ColorScheme.default is
equivalent to Adw.ColorScheme.prefer-light.
The StyleManager:system-supports-color-schemes property can be
used to check if the current environment provides a color scheme
preference.
Its value is a <AdwColorScheme> (or, to set
it, one of its symbols).
Set it with (set! (style-manager:color-scheme self) value).
Whether the application is using dark appearance.
This property can be used to query the current appearance, as requested
via StyleManager:color-scheme.
Its value is a boolean.
It is read only.
The display the style manager is associated with.
The display will be NULL for the style manager returned by
StyleManager.get_default.
Its value is a <GdkDisplay>, or #f.
It can only be set when the object is made, with #:display.
The system document font.
The font is in the same format as settings:gtk-font-name, e.g. "Adwaita Sans 12".
Use font-description:from-string to parse it.
Its value is a string, or #f.
It is read only.
Whether the application is using high contrast appearance.
This cannot be overridden by applications.
Its value is a boolean.
It is read only.
The system monospace font.
The font is in the same format as settings:gtk-font-name, e.g. "Adwaita Mono 11".
Use font-description:from-string to parse it.
Its value is a string, or #f.
It is read only.
Whether the system supports accent colors.
This property can be used to check if the current environment provides
an accent color preference. For example, applications might want to
show a preference for choosing accent color if it’s set to FALSE.
See StyleManager:accent-color.
Its value is a boolean.
It is read only.
Whether the system supports color schemes.
This property can be used to check if the current environment provides a
color scheme preference. For example, applications might want to show a
separate appearance switcher if it’s set to FALSE.
See StyleManager:color-scheme.
Its value is a boolean.
It is read only.
The Yaru accent color used by the application, if any. This is only available in ubuntu.
This cannot be overridden by applications.
Its value is a string, or #f.
It is read only.
Gets the current system accent color.
See also StyleManager:accent-color-rgba.
Passed: a <AdwStyleManager>.
a style manager
Returned: a <AdwAccentColor>.
the current system accent color
Gets the current system accent color as a
<GdkRGBA>.
Equivalent to calling AccentColor.to_rgba on the value of
StyleManager:accent-color.
This is a background color. The matching foreground color is white.
Passed: a <AdwStyleManager>.
a style manager
Returned: a <GdkRGBA>.
the current system accent color
Gets the requested application color scheme.
Passed: a <AdwStyleManager>.
a style manager
Returned: a <AdwColorScheme>.
the color scheme
Gets whether the application is using dark appearance.
This can be used to query the current appearance, as requested via
StyleManager:color-scheme.
Passed: a <AdwStyleManager>.
a style manager
Returned: a boolean.
whether the application is using dark appearance
Gets the default <AdwStyleManager> instance.
It manages all <GdkDisplay> instances unless
the style manager for that display has an override.
See StyleManager.get_for_display.
Returned: a <AdwStyleManager>.
the default style manager
Gets the display the style manager is associated with.
The display will be NULL for the style manager returned by
StyleManager.get_default.
Passed: a <AdwStyleManager>.
a style manager
Returned: a <GdkDisplay>, or #f.
the display
Gets the system document font.
The font is in the same format as settings:gtk-font-name, e.g. "Adwaita Sans 12".
Use font-description:from-string to parse it.
Passed: a <AdwStyleManager>.
a style manager
Returned: a string.
the system document font
Gets the <AdwStyleManager> instance managing
display.
It can be used to override styles for that specific display instead of the whole application.
Most applications should use StyleManager.get_default instead.
Passed: a <GdkDisplay>.
Returned: a <AdwStyleManager>.
the style manager for display
Gets whether the application is using high contrast appearance.
This cannot be overridden by applications.
Passed: a <AdwStyleManager>.
a style manager
Returned: a boolean.
whether the application is using high contrast appearance
Gets the system monospace font.
The font is in the same format as settings:gtk-font-name, e.g. "Adwaita Mono 11".
Use font-description:from-string to parse it.
Passed: a <AdwStyleManager>.
a style manager
Returned: a string.
the system monospace font
Gets whether the system supports accent colors.
This can be used to check if the current environment provides an accent
color preference. For example, applications might want to show a
preference for choosing accent color if it’s set to FALSE.
See StyleManager:accent-color.
Passed: a <AdwStyleManager>.
a style manager
Returned: a boolean.
whether the system supports accent colors
Gets whether the system supports color schemes.
This can be used to check if the current environment provides a color
scheme preference. For example, applications might want to show a
separate appearance switcher if it’s set to FALSE.
Passed: a <AdwStyleManager>.
a style manager
Returned: a boolean.
whether the system supports color schemes
Sets the requested application color scheme.
The effective appearance will be decided based on the application color
scheme and the system preferred color scheme. The
StyleManager:dark property can be used to query the current
effective appearance.
The Adw.ColorScheme.prefer-light color scheme results in the
application using light appearance unless the system prefers dark
colors. This is the default value.
The Adw.ColorScheme.prefer-dark color scheme results in the
application using dark appearance, but can still switch to the light
appearance if the system can prefers it, for example, when the high
contrast preference is enabled.
The Adw.ColorScheme.force-light and
Adw.ColorScheme.force-dark values ignore the system preference
entirely. They are useful if the application wants to match its UI to
its content or to provide a separate color scheme switcher.
If a per-<GdkDisplay> style manager has its
color scheme set to Adw.ColorScheme.default, it will inherit the
color scheme from the default style manager.
For the default style manager, Adw.ColorScheme.default is
equivalent to Adw.ColorScheme.prefer-light.
The StyleManager:system-supports-color-schemes property can be
used to check if the current environment provides a color scheme
preference.
Passed: a <AdwStyleManager>.
a style manager
Passed: a <AdwColorScheme>, or one of its
symbols.
the color scheme