Expose flexible panel settings in settings UI (#52946)
Release Notes: - Added controls to the settings UI for whether the terminal and agent panels use flexible width.
This commit is contained in:
1 parent
c02ea54130
commit
06f939d355
1 file changed
+28
-2
@@ -4990,7 +4990,7 @@ fn panels_page() -> SettingsPage {
|
||||
]
|
||||
}
|
||||
|
||||
fn terminal_panel_section() -> [SettingsPageItem; 3] {
|
||||
fn terminal_panel_section() -> [SettingsPageItem; 4] {
|
||||
[
|
||||
SettingsPageItem::SectionHeader("Terminal Panel"),
|
||||
SettingsPageItem::SettingItem(SettingItem {
|
||||
@@ -5006,6 +5006,19 @@ fn panels_page() -> SettingsPage {
|
||||
metadata: None,
|
||||
files: USER,
|
||||
}),
|
||||
SettingsPageItem::SettingItem(SettingItem {
|
||||
title: "Terminal Panel Flexible Sizing",
|
||||
description: "Whether the terminal panel should use flexible (proportional) sizing when docked to the left or right.",
|
||||
field: Box::new(SettingField {
|
||||
json_path: Some("terminal.flexible"),
|
||||
pick: |settings_content| settings_content.terminal.as_ref()?.flexible.as_ref(),
|
||||
write: |settings_content, value| {
|
||||
settings_content.terminal.get_or_insert_default().flexible = value;
|
||||
},
|
||||
}),
|
||||
metadata: None,
|
||||
files: USER,
|
||||
}),
|
||||
SettingsPageItem::SettingItem(SettingItem {
|
||||
title: "Show Count Badge",
|
||||
description: "Show a badge on the terminal panel icon with the count of open terminals.",
|
||||
@@ -5666,7 +5679,7 @@ fn panels_page() -> SettingsPage {
|
||||
]
|
||||
}
|
||||
|
||||
fn agent_panel_section() -> [SettingsPageItem; 5] {
|
||||
fn agent_panel_section() -> [SettingsPageItem; 6] {
|
||||
[
|
||||
SettingsPageItem::SectionHeader("Agent Panel"),
|
||||
SettingsPageItem::SettingItem(SettingItem {
|
||||
@@ -5695,6 +5708,19 @@ fn panels_page() -> SettingsPage {
|
||||
metadata: None,
|
||||
files: USER,
|
||||
}),
|
||||
SettingsPageItem::SettingItem(SettingItem {
|
||||
title: "Agent Panel Flexible Sizing",
|
||||
description: "Whether the agent panel should use flexible (proportional) sizing when docked to the left or right.",
|
||||
field: Box::new(SettingField {
|
||||
json_path: Some("agent.flexible"),
|
||||
pick: |settings_content| settings_content.agent.as_ref()?.flexible.as_ref(),
|
||||
write: |settings_content, value| {
|
||||
settings_content.agent.get_or_insert_default().flexible = value;
|
||||
},
|
||||
}),
|
||||
metadata: None,
|
||||
files: USER,
|
||||
}),
|
||||
SettingsPageItem::SettingItem(SettingItem {
|
||||
title: "Agent Panel Default Width",
|
||||
description: "Default width when the agent panel is docked to the left or right.",
|
||||
|
||||
Reference in new issue
Block a user