feat(macOS): support cmd+w and cmd+q

This commit is contained in:
GyDi 2022-11-04 00:51:46 +08:00
parent 38e1a4febf
commit 22c2382765
No known key found for this signature in database
GPG Key ID: 58B15242BA8277A6

View File

@ -82,14 +82,16 @@ fn main() -> std::io::Result<()> {
builder = builder.menu(
Menu::new().add_submenu(Submenu::new(
"File",
"Edit",
Menu::new()
.add_native_item(MenuItem::Undo)
.add_native_item(MenuItem::Redo)
.add_native_item(MenuItem::Copy)
.add_native_item(MenuItem::Paste)
.add_native_item(MenuItem::Cut)
.add_native_item(MenuItem::SelectAll),
.add_native_item(MenuItem::SelectAll)
.add_native_item(MenuItem::CloseWindow)
.add_native_item(MenuItem::Quit)
)),
);
}