gpui: Support is_resizable
and is_minimizable
support for window
This commit is contained in:
parent
11545c669e
commit
3f396a2311
9 changed files with 77 additions and 8 deletions
|
@ -152,6 +152,36 @@ impl Render for WindowDemo {
|
|||
)
|
||||
.unwrap();
|
||||
}))
|
||||
.child(button("Unresizable", move |_, cx| {
|
||||
cx.open_window(
|
||||
WindowOptions {
|
||||
is_resizable: false,
|
||||
window_bounds: Some(window_bounds),
|
||||
..Default::default()
|
||||
},
|
||||
|_, cx| {
|
||||
cx.new(|_| SubWindow {
|
||||
custom_titlebar: false,
|
||||
})
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
}))
|
||||
.child(button("Unminimizable", move |_, cx| {
|
||||
cx.open_window(
|
||||
WindowOptions {
|
||||
is_minimizable: false,
|
||||
window_bounds: Some(window_bounds),
|
||||
..Default::default()
|
||||
},
|
||||
|_, cx| {
|
||||
cx.new(|_| SubWindow {
|
||||
custom_titlebar: false,
|
||||
})
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
}))
|
||||
.child(button("Hide Application", |window, cx| {
|
||||
cx.hide();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue