ThemeManager
classin packageklyn.gui.windows.themes
public class ThemeManager:
ThemeManager

Central access point for klyn.gui.windows themes.

light, dark and system are reserved appearance modes used by the built-in themes. Application-specific themes can be registered with any other normalized name without replacing the built-in theme slots.

ThemeManager.setAppearanceMode(ThemeManager.MODE_SYSTEM)
Fields
Modifier and Type Member Description
public static readonly MODE_DARK
MODE_DARK as String = "dark"
No summary.
public static readonly MODE_LIGHT
MODE_LIGHT as String = "light"
No summary.
public static readonly MODE_SYSTEM
MODE_SYSTEM as String = "system"
No summary.
Methods
Modifier and Type Member Description
public static appearanceMode
appearanceMode() as String:
Returns the configured global appearance mode.
public static applyStyle
applyStyle(widget as Widget) as Void:
Applies layout-related KSS metrics to a widget.
public static applyStyleTree
applyStyleTree(widget as Widget) as Void:
Applies KSS layout metrics recursively.
public static effectiveAppearanceMode
effectiveAppearanceMode(mode as String = null) as String:
Resolves `system` into `light` or `dark`.
public static resolveStyle
resolveStyle(widget as Widget) as ThemeStyle:
Resolves the current style for a widget.
public static setAppearanceMode
setAppearanceMode(mode as String) as Void:
Sets the global appearance mode used by windows that keep the default.
public static setTheme
setTheme(mode as String, theme as KssTheme) as Void:
Registers a loaded KSS theme.
public static setThemeFromFile
setThemeFromFile(mode as String, path as Object) as Void:
Loads a KSS file and installs it for the requested mode or theme name.
public static theme
theme(mode as String = null) as KssTheme:
Returns the active theme for the requested mode or custom theme name.