mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-26 08:31:04 +00:00
Toggle window zoom/maximize when double clicking titlebar
This commit is contained in:
parent
1f7db46d98
commit
55be05b05c
1 changed files with 32 additions and 24 deletions
|
@ -1870,6 +1870,7 @@ impl Workspace {
|
|||
};
|
||||
|
||||
ConstrainedBox::new(
|
||||
MouseEventHandler::new::<Self, _, _>(0, cx, |_, cx| {
|
||||
Container::new(
|
||||
Stack::new()
|
||||
.with_child(
|
||||
|
@ -1897,6 +1898,13 @@ impl Workspace {
|
|||
.boxed(),
|
||||
)
|
||||
.with_style(container_theme)
|
||||
.boxed()
|
||||
})
|
||||
.on_click(MouseButton::Left, |event, cx| {
|
||||
if event.click_count == 2 {
|
||||
cx.zoom_window(cx.window_id());
|
||||
}
|
||||
})
|
||||
.boxed(),
|
||||
)
|
||||
.with_height(theme.workspace.titlebar.height)
|
||||
|
|
Loading…
Reference in a new issue