public applyTheme(mode as String = null) as Void:
Applies a new appearance mode to this window and requests a repaint.
MainWindow overrides this method to also re-run KSS metric propagation through its menu bar and central widget tree. Use this method for hot theme switching instead of assigning appearanceMode directly when the window is already visible.
| Parameter | Description |
|---|---|
mode | Optional appearance mode (light, dark, system or a custom theme name). When omitted, the current appearanceMode is reused. |
win.applyTheme(ThemeManager.MODE_DARK)