Files

18 lines
611 B
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import SwiftUI
@main
struct IrizAppMain: App {
@NSApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate
var body: some Scene {
MenuBarExtra {
MenuContentView(state: appDelegate.menuState, appDelegate: appDelegate)
} label: {
MenuBarLabelView(state: appDelegate.menuState)
}
// .window, а не .menu: NSMenu не даёт ни кегля, ни веса, ни отступов —
// иерархию в нём не построить (см. MenuContentView и VISUAL_SPEC §6).
.menuBarExtraStyle(.window)
}
}