workspace: Add setting to make dock resize apply to all panels (#30551)
Re: #19015 Close #12667 When dragging a dock’s resize handle, only the active panel grows or shrinks. This patch introduces an opt-in behaviour that lets users resize every panel hosted by that dock at once. Release Notes: - Added new `resize_all_panels_in_dock` setting to optionally resize every panel in a dock together. Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
parent
ff6ac60bad
commit
8c1b549683
4 changed files with 46 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
use std::num::NonZeroUsize;
|
||||
|
||||
use crate::DockPosition;
|
||||
use anyhow::Result;
|
||||
use collections::HashMap;
|
||||
use gpui::App;
|
||||
|
@ -26,6 +27,7 @@ pub struct WorkspaceSettings {
|
|||
pub max_tabs: Option<NonZeroUsize>,
|
||||
pub when_closing_with_no_tabs: CloseWindowWhenNoItems,
|
||||
pub on_last_window_closed: OnLastWindowClosed,
|
||||
pub resize_all_panels_in_dock: Vec<DockPosition>,
|
||||
pub close_on_file_delete: bool,
|
||||
}
|
||||
|
||||
|
@ -192,6 +194,10 @@ pub struct WorkspaceSettingsContent {
|
|||
///
|
||||
/// Default: auto (nothing on macOS, "app quit" otherwise)
|
||||
pub on_last_window_closed: Option<OnLastWindowClosed>,
|
||||
/// Whether to resize all the panels in a dock when resizing the dock.
|
||||
///
|
||||
/// Default: ["left"]
|
||||
pub resize_all_panels_in_dock: Option<Vec<DockPosition>>,
|
||||
/// Whether to automatically close files that have been deleted on disk.
|
||||
///
|
||||
/// Default: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue