Builds the QApplication::palette() from the current theme's token map and mode, and pushes it via QApplication::setPalette().
The baseline palette comes from:
- macOS (any supported Qt) and Windows on Qt ≥ 6.8: a caller- supplied osBaseline snapshot. ThemeManager captures this from the platform style at construction time (when the palette is pristine) and refreshes it whenever the effective scheme flips. Reading QApplication::palette() here would be wrong: once the builder has pushed any palette via setPalette(), subsequent reads return that customized palette — so consecutive theme switches would accumulate overrides instead of restarting from a clean OS baseline.
- Linux (any Qt) and Windows on Qt < 6.8: our own built-in light or dark palette (see builtInLightPalette() / builtInDarkPalette()). The Linux platform themes (gnome/gtk3/qt6ct) silently ignore QStyleHints::setColorScheme() and pin both the hint and standardPalette() to the OS value, which makes "Dark mode on a Light OS" (or vice versa) impossible to honor without supplying our own palette. Old Fusion has the same problem. osBaseline is ignored on these platforms.
Theme-provided palette overrides (the palette: section of theme.jsonc) are applied on top of the baseline. Brand-driven roles (Highlight, Link, Accent, HighlightedText) are always overlaid last, so themes don't need to set them.