Introduce a new WindowContext::remove_window API

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-04-21 16:39:53 +02:00
parent f12746c4b7
commit 8c7f821d14
8 changed files with 25 additions and 29 deletions

View file

@ -265,8 +265,7 @@ where
icon(style).boxed()
})
.on_click(platform::MouseButton::Left, move |_, _, cx| {
let window_id = cx.window_id();
cx.remove_window(window_id);
cx.remove_window();
})
.with_cursor_style(platform::CursorStyle::PointingHand)
.aligned()