diff --git a/crates/theme_selector/src/theme_selector.rs b/crates/theme_selector/src/theme_selector.rs index f1e933774f..5c679be841 100644 --- a/crates/theme_selector/src/theme_selector.rs +++ b/crates/theme_selector/src/theme_selector.rs @@ -36,7 +36,12 @@ impl ThemeSelector { let handle = cx.weak_handle(); let picker = cx.add_view(|cx| Picker::new(handle, cx)); let original_theme = cx.global::().theme.clone(); - let theme_names = registry.list().collect::>(); + let mut theme_names = registry.list().collect::>(); + theme_names.sort_unstable_by(|a, b| { + a.ends_with("dark") + .cmp(&b.ends_with("dark")) + .then_with(|| a.cmp(&b)) + }); let matches = theme_names .iter() .map(|name| StringMatch {