Desktop: Add app menu for Mac (#3428)

* add mac app menu

* review fixup

* Remove "About Graphite" ellipsis, add "Show All", make it say "Quit Graphite"

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Timon
2025-11-28 23:42:14 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent 406f3d93f3
commit bb4516e377
15 changed files with 230 additions and 93 deletions
@@ -468,7 +468,7 @@ pub fn input_mappings() -> Mapping {
// Sort `pointer_shake`
sort(&mut pointer_shake);
Mapping {
let mut mapping = Mapping {
key_up,
key_down,
key_up_no_repeat,
@@ -477,7 +477,16 @@ pub fn input_mappings() -> Mapping {
wheel_scroll,
pointer_move,
pointer_shake,
};
if cfg!(target_os = "macos") {
let remove: [&[&[MappingEntry; 0]; 0]; 0] = [];
let add = [entry!(KeyDown(KeyQ); modifiers=[Accel], action_dispatch=AppWindowMessage::Close)];
apply_mapping_patch(&mut mapping, remove, add);
}
mapping
}
/// Default mappings except that scrolling without modifier keys held down is bound to zooming instead of vertical panning