DroppyIconStyleObserver
The user's icon style, kept current.
@MainActor final class DroppyIconStyleObserver
It refreshes on the notification AppKit posts when the icon style changes, on the interface theme change, when Droppy becomes active, and on any write to the global keys it reads. Reading style from a SwiftUI body subscribes the view, so an icon redraws the moment the user picks another style.
Type properties
shared
@MainActor static let shared: DroppyIconStyleObserver
Properties
style
@MainActor var style: DroppyIconStyle { get set }
The current style.
Methods
refresh()
@MainActor func refresh()
Re-reads the style now. The observers call this; a caller that knows something changed may too.