settings_ui: Title Case Enums (#39711)
Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Generated
+1
@@ -14370,6 +14370,7 @@ dependencies = [
|
||||
"futures 0.3.31",
|
||||
"fuzzy",
|
||||
"gpui",
|
||||
"heck 0.5.0",
|
||||
"language",
|
||||
"menu",
|
||||
"node_runtime",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user