fix(engine): restore Dark as default theme; migrate stale theme IDs
- default_theme_id() returns "dark" (was briefly "classic" after the
rename commit 20b7a61)
- sanitized() migrates "default" and "classic" → "dark" so existing
settings.json files are upgraded automatically on next launch
- Registry lists Dark first so the Settings picker opens with it at top
- Classic remains available as an option in the picker
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -100,8 +100,8 @@ fn build_registry_on_startup(mut registry: bevy::ecs::system::ResMut<ThemeRegist
|
||||
/// [`user_theme_dir`].
|
||||
pub fn build_registry(user_dir: &Path) -> ThemeRegistry {
|
||||
let mut entries = Vec::new();
|
||||
entries.push(classic_entry());
|
||||
entries.push(dark_entry());
|
||||
entries.push(classic_entry());
|
||||
entries.extend(discover_user_themes(user_dir));
|
||||
ThemeRegistry { entries }
|
||||
}
|
||||
@@ -264,8 +264,8 @@ mod tests {
|
||||
let tmp = tempfile::tempdir().unwrap();
|
||||
let registry = build_registry(tmp.path());
|
||||
assert_eq!(registry.len(), BUNDLED_COUNT);
|
||||
assert_eq!(registry.entries[0].id, "classic");
|
||||
assert_eq!(registry.entries[1].id, "dark");
|
||||
assert_eq!(registry.entries[0].id, "dark");
|
||||
assert_eq!(registry.entries[1].id, "classic");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user