MCPcopy Create free account
hub / github.com/GCWing/BitFun / resolve_builtin_theme_id

Method resolve_builtin_theme_id

src/apps/desktop/src/theme.rs:380–389  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected