mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 14:17:02 +00:00
Only include one border edge for zoomed panels
This commit is contained in:
parent
1f72f9e18b
commit
893615236d
1 changed files with 30 additions and 26 deletions
|
@ -3288,32 +3288,36 @@ impl View for Workspace {
|
||||||
enum ZoomBackground {}
|
enum ZoomBackground {}
|
||||||
let zoomed = zoomed.upgrade(cx)?;
|
let zoomed = zoomed.upgrade(cx)?;
|
||||||
|
|
||||||
let mut foreground_style;
|
let mut foreground_style =
|
||||||
match self.zoomed_position {
|
theme.workspace.zoomed_pane_foreground;
|
||||||
Some(DockPosition::Left) => {
|
if let Some(zoomed_dock_position) = self.zoomed_position {
|
||||||
foreground_style =
|
foreground_style =
|
||||||
theme.workspace.zoomed_panel_foreground;
|
theme.workspace.zoomed_panel_foreground;
|
||||||
foreground_style.margin.left = 0.;
|
let margin = foreground_style.margin.top;
|
||||||
foreground_style.margin.top = 0.;
|
let border = foreground_style.border.top;
|
||||||
foreground_style.margin.bottom = 0.;
|
|
||||||
}
|
// Only include a margin and border on the opposite side.
|
||||||
Some(DockPosition::Right) => {
|
foreground_style.margin.top = 0.;
|
||||||
foreground_style =
|
foreground_style.margin.left = 0.;
|
||||||
theme.workspace.zoomed_panel_foreground;
|
foreground_style.margin.bottom = 0.;
|
||||||
foreground_style.margin.right = 0.;
|
foreground_style.margin.right = 0.;
|
||||||
foreground_style.margin.top = 0.;
|
foreground_style.border.top = false;
|
||||||
foreground_style.margin.bottom = 0.;
|
foreground_style.border.left = false;
|
||||||
}
|
foreground_style.border.bottom = false;
|
||||||
Some(DockPosition::Bottom) => {
|
foreground_style.border.right = false;
|
||||||
foreground_style =
|
match zoomed_dock_position {
|
||||||
theme.workspace.zoomed_panel_foreground;
|
DockPosition::Left => {
|
||||||
foreground_style.margin.left = 0.;
|
foreground_style.margin.right = margin;
|
||||||
foreground_style.margin.right = 0.;
|
foreground_style.border.right = border;
|
||||||
foreground_style.margin.bottom = 0.;
|
}
|
||||||
}
|
DockPosition::Right => {
|
||||||
None => {
|
foreground_style.margin.left = margin;
|
||||||
foreground_style =
|
foreground_style.border.left = border;
|
||||||
theme.workspace.zoomed_pane_foreground;
|
}
|
||||||
|
DockPosition::Bottom => {
|
||||||
|
foreground_style.margin.top = margin;
|
||||||
|
foreground_style.border.top = border;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue