Maps config `themes.current` to a built-in id for splash / window chrome. `system` follows OS light/dark (aligned with web-ui `getSystemPreferredDefaultThemeId`).
(theme_id: &str)
| 378 | /// Maps config `themes.current` to a built-in id for splash / window chrome. |
| 379 | /// `system` follows OS light/dark (aligned with web-ui `getSystemPreferredDefaultThemeId`). |
| 380 | fn resolve_builtin_theme_id(theme_id: &str) -> &str { |
| 381 | if theme_id == "system" { |
| 382 | let manifest = Self::startup_theme_bootstrap_manifest(); |
| 383 | return match dark_light::detect() { |
| 384 | Mode::Dark => manifest.default_dark_theme_id.as_str(), |
| 385 | Mode::Light | Mode::Default => manifest.default_light_theme_id.as_str(), |
| 386 | }; |
| 387 | } |
| 388 | theme_id |
| 389 | } |
| 390 | |
| 391 | fn startup_messages_json(locale: &str) -> String { |
| 392 | let messages = match locale { |