Add centered layout support (#9754)
This PR implements the Centered Layout feature (#4685): - Added the `toggle centered layout` action. - The centered layout mode only takes effect when there's a single central pane. - The state of the centered layout toggle is saved / restored between Zed restarts. - The paddings are controlled by the `centered_layout` setting: ```json "centered_layout": { "left_padding": 0.2, "right_padding": 0.2 } ``` This allows us to support both the VSCode-style (equal paddings) and IntelliJ-style (only left padding in Zen mode). Release Notes: - Added support for Centered Layout ([#4685](https://github.com/zed-industries/zed/pull/9754)). https://github.com/zed-industries/zed/assets/2101250/2d5b2a16-c248-48b5-9e8c-6f1219619398 Related Issues: - Part of #4382
This commit is contained in:
parent
52591905fb
commit
4eb1e65fbb
6 changed files with 146 additions and 17 deletions
|
@ -71,6 +71,7 @@ pub(crate) struct SerializedWorkspace {
|
|||
pub(crate) center_group: SerializedPaneGroup,
|
||||
pub(crate) bounds: Option<Bounds<DevicePixels>>,
|
||||
pub(crate) fullscreen: bool,
|
||||
pub(crate) centered_layout: bool,
|
||||
pub(crate) display: Option<Uuid>,
|
||||
pub(crate) docks: DockStructure,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue