settings_ui: Handle enums with fields (#37945)
Closes #ISSUE
Adds handling for Enums with fields (i.e. not `enum Foo { Yes, No }`) in
Settings UI. Accomplished by creating default values for each element
with fields (in the derive macro), and rendering a toggle button group
with a button for each variant where switching the active variant sets
the value in the settings JSON to the default for the new active
variant.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
---------
Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
@@ -456,7 +456,7 @@ Project panel can be shown/hidden with {#action project_panel::ToggleFocus} ({#k
|
||||
"button": true, // Show/hide the icon in the status bar
|
||||
"dock": "right", // Where to dock: left, right, bottom
|
||||
"default_width": 640, // Default width (left/right docked)
|
||||
"default_height": 320, // Default height (bottom dockeed)
|
||||
"default_height": 320, // Default height (bottom docked)
|
||||
},
|
||||
"agent_font_size": 16
|
||||
```
|
||||
@@ -471,7 +471,7 @@ See [Zed AI Documentation](./ai/overview.md) for additional non-visual AI settin
|
||||
"dock": "bottom", // Where to dock: left, right, bottom
|
||||
"button": true, // Show/hide status bar icon
|
||||
"default_width": 640, // Default width (left/right docked)
|
||||
"default_height": 320, // Default height (bottom dockeed)
|
||||
"default_height": 320, // Default height (bottom docked)
|
||||
|
||||
// Set the cursor blinking behavior in the terminal (on, off, terminal_controlled)
|
||||
"blinking": "terminal_controlled",
|
||||
|
||||
Reference in New Issue
Block a user