diff --git a/Cargo.lock b/Cargo.lock index f5102607322bd639af2bab394e2c005d96dd9d78..ada56e87e59dca20aaa3bb240dcdb4756d13270a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14370,6 +14370,7 @@ dependencies = [ "futures 0.3.31", "fuzzy", "gpui", + "heck 0.5.0", "language", "menu", "node_runtime", diff --git a/crates/settings_ui/Cargo.toml b/crates/settings_ui/Cargo.toml index c2cb1ce62b3284c37e6a038f7f6f399acfb8aabf..0b456d0cb11d62f227414609c6017199d284754a 100644 --- a/crates/settings_ui/Cargo.toml +++ b/crates/settings_ui/Cargo.toml @@ -18,6 +18,7 @@ test-support = [] [dependencies] anyhow.workspace = true command_palette_hooks.workspace = true +heck.workspace = true editor.workspace = true feature_flags.workspace = true fs.workspace = true diff --git a/crates/settings_ui/src/settings_ui.rs b/crates/settings_ui/src/settings_ui.rs index dd5d953c049542eceac224b17b0a9a66a04c4661..6bb35d53a28852eb0aa6b4e3bc41b3020bddab0d 100644 --- a/crates/settings_ui/src/settings_ui.rs +++ b/crates/settings_ui/src/settings_ui.rs @@ -11,6 +11,7 @@ use gpui::{ ScrollHandle, Task, TitlebarOptions, UniformListScrollHandle, Window, WindowHandle, WindowOptions, actions, div, point, prelude::*, px, size, uniform_list, }; +use heck::ToTitleCase as _; use project::WorktreeId; use schemars::JsonSchema; use serde::Deserialize; @@ -1639,12 +1640,12 @@ where DropdownMenu::new( "dropdown", - current_value_label, + current_value_label.to_title_case(), ContextMenu::build(window, cx, move |mut menu, _, _| { for (&value, &label) in std::iter::zip(variants(), labels()) { let file = file.clone(); menu = menu.toggleable_entry( - label, + label.to_title_case(), value == current_value, IconPosition::Start, None,