orchetect / MacControlCenterUI

SwiftUI menu builder DSL & controls that mimic macOS Control Center.
MIT License
93 stars 5 forks source link

TrayIcon? #6

Closed henrikruscon closed 1 year ago

henrikruscon commented 1 year ago

Fantastic work so far, solves a lot of my issues. Wondering if it would be possible to add ability to change tray icon (menu bar)? Right now it only accepts systemImages.

orchetect commented 1 year ago

Do you mean MenuBarExtra? Have you tried its overloads for custom images?

henrikruscon commented 1 year ago

Yeah that's what I mean, like for example here is the icon for Color Picker app (but it uses SF symbols, not custom image):

CleanShot 2023-03-07 at 00 56 57@2x

Not sure what you mean?

orchetect commented 1 year ago

Overloads mean different initializers. MenuBarExtra can take a custom image with one of the alternate initializers:

https://developer.apple.com/documentation/swiftui/menubarextra

menubarextra