Desktop: Mac native menu bar (#3301)

* macos native menu bar

* fix nix build

* Add shortcut symbols to menu

* fix fmt

* fix vendoring

* cleanup intercept frontend message

* accept into editor message in queue function
This commit is contained in:
Timon
2025-10-27 14:11:24 +00:00
committed by GitHub
parent 6ca25e4ea9
commit 5be9b1fabc
22 changed files with 458 additions and 45 deletions
+3 -3
View File
@@ -1,13 +1,13 @@
use winit::event_loop::ActiveEventLoop;
use winit::window::{Window, WindowAttributes};
use super::NativeWindow;
use crate::event::AppEventScheduler;
pub(super) struct NativeWindowImpl {
native_handle: native_handle::NativeWindowHandle,
}
impl NativeWindow for NativeWindowImpl {
impl super::NativeWindow for NativeWindowImpl {
fn configure(attributes: WindowAttributes, _event_loop: &dyn ActiveEventLoop) -> WindowAttributes {
if let Ok(win_icon) = winit::platform::windows::WinIcon::from_resource(1, None) {
let icon = winit::icon::Icon(std::sync::Arc::new(win_icon));
@@ -17,7 +17,7 @@ impl NativeWindow for NativeWindowImpl {
}
}
fn new(window: &dyn Window) -> Self {
fn new(window: &dyn Window, _app_event_scheduler: AppEventScheduler) -> Self {
let native_handle = native_handle::NativeWindowHandle::new(window);
NativeWindowImpl { native_handle }
}