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(
|
ConstrainedBox::new(
|
||||||
|
MouseEventHandler::new::<Self, _, _>(0, cx, |_, cx| {
|
||||||
Container::new(
|
Container::new(
|
||||||
Stack::new()
|
Stack::new()
|
||||||
.with_child(
|
.with_child(
|
||||||
|
@ -1897,6 +1898,13 @@ impl Workspace {
|
||||||
.boxed(),
|
.boxed(),
|
||||||
)
|
)
|
||||||
.with_style(container_theme)
|
.with_style(container_theme)
|
||||||
|
.boxed()
|
||||||
|
})
|
||||||
|
.on_click(MouseButton::Left, |event, cx| {
|
||||||
|
if event.click_count == 2 {
|
||||||
|
cx.zoom_window(cx.window_id());
|
||||||
|
}
|
||||||
|
})
|
||||||
.boxed(),
|
.boxed(),
|
||||||
)
|
)
|
||||||
.with_height(theme.workspace.titlebar.height)
|
.with_height(theme.workspace.titlebar.height)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue