gpui: improve the window menu on macOS

This commit is contained in:
Chuqiao Feng 2025-08-23 22:16:34 +08:00
parent 70575d1115
commit b724431256
No known key found for this signature in database
GPG key ID: 817C351E0A1EC12E
4 changed files with 54 additions and 31 deletions

View file

@ -46,6 +46,15 @@ impl OsMenu {
pub enum SystemMenuType {
/// The 'Services' menu in the Application menu on macOS
Services,
/// The 'Window' menu on macOS.
///
/// This item is a marker and will not display as a menu item.
/// If a menu begins with this item, it will be treated as the Window menu.
///
/// macOS will add window management items to this menu, such as
/// 'Fill', 'Center', 'Move to [Display]', and a list of windows.
Window,
}
/// The different kinds of items that can be in a menu