Jankily adjust left padding on workspace title in fullscreen

This could seriously be done better

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
ForLoveOfCats 2022-08-09 19:03:03 -04:00
parent 43b9f3beb3
commit 3d9821b430
2 changed files with 18 additions and 7 deletions

View file

@ -1858,6 +1858,17 @@ impl Workspace {
worktree_root_names.push_str(name);
}
// TODO: There should be a better system in place for this
// (https://github.com/zed-industries/zed/issues/1290)
let is_fullscreen = cx.window_is_fullscreen(cx.window_id());
let container_theme = if is_fullscreen {
let mut container_theme = theme.workspace.titlebar.container;
container_theme.padding.left = container_theme.padding.right;
container_theme
} else {
theme.workspace.titlebar.container
};
ConstrainedBox::new(
Container::new(
Stack::new()
@ -1885,7 +1896,7 @@ impl Workspace {
)
.boxed(),
)
.with_style(theme.workspace.titlebar.container)
.with_style(container_theme)
.boxed(),
)
.with_height(theme.workspace.titlebar.height)