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 const MODE_DARK
MODE_DARK as String = "dark"
No summary.
public const MODE_LIGHT
MODE_LIGHT as String = "light"
No summary.
public const MODE_SYSTEM
MODE_SYSTEM as String = "system"
No summary.
Properties
Modifier and Type Member Description
public static readonly property contentZoom
contentZoom as Double
Current runtime content zoom factor applied on top of KSS metrics.
public static readonly property contentZoomRevision
contentZoomRevision as Int
Monotonic revision incremented only when the runtime content zoom changes.
public static readonly property fontZoom
fontZoom as Double
Backward-compatible alias for contentZoom.
public static readonly property revision
revision as Int
Monotonic revision incremented when the active theme configuration changes.
Methods
Modifier and Type Member Description
public static adjustContentZoom
adjustContentZoom(steps as Int) as Boolean
Adjusts the runtime content zoom by wheel steps.
public static adjustFontZoom
adjustFontZoom(steps as Int) as Boolean
Backward-compatible alias for adjustContentZoom.
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 resetContentZoom
resetContentZoom() as Boolean
Resets the runtime content zoom to the default factor.
public static resetFontZoom
resetFontZoom() as Boolean
Backward-compatible alias for resetContentZoom.
public static resolveStyle
resolveStyle(widget as Widget) as ThemeStyle
Resolves the current style for a widget.
public static scaleAdaptiveFont
scaleAdaptiveFont(font as String) as String
Scales a painter font with the same content zoom factor as a KSS font.
public static scaleAdaptiveFontSize
scaleAdaptiveFontSize(value as Int) as Int
Scales a numeric font size with the same factors as scaleAdaptiveFont.
public static scaleFont
scaleFont(font as String) as String
Scales an explicit painter font with the current content zoom.
public static scaleMetric
scaleMetric(value as Double) as Double
Scales a floating-point metric with the current content zoom.
public static scaleMetric
scaleMetric(value as Int) as Int
Scales an integer metric with the current content zoom.
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.