fix: render light palettes with matching appearance
This commit is contained in:
@@ -6,6 +6,7 @@ final class LauncherAlignmentGuides {
|
||||
private let view = AlignmentGuideView()
|
||||
private lazy var overlay: NSPanel = {
|
||||
let panel = NSPanel(contentRect: .zero, styleMask: [.borderless, .nonactivatingPanel], backing: .buffered, defer: false)
|
||||
panel.appearance = ThemePalette.appearance
|
||||
panel.backgroundColor = .clear
|
||||
panel.isOpaque = false
|
||||
panel.hasShadow = false
|
||||
@@ -20,6 +21,7 @@ final class LauncherAlignmentGuides {
|
||||
|
||||
func begin(for window: NSWindow) {
|
||||
guard !dragging, window.screen != nil else { return }
|
||||
overlay.appearance = ThemePalette.appearance
|
||||
dragging = true
|
||||
update(for: window)
|
||||
overlay.level = window.level
|
||||
@@ -66,6 +68,7 @@ private final class AlignmentGuideView: NSView {
|
||||
override init(frame frameRect: NSRect) {
|
||||
super.init(frame: frameRect)
|
||||
themeObservation = ThemeObservation { [weak self] in
|
||||
self?.window?.appearance = ThemePalette.appearance
|
||||
self?.muted = ThemePalette.accent.withAlphaComponent(0.4).cgColor
|
||||
self?.aligned = ThemePalette.accent.withAlphaComponent(0.95).cgColor
|
||||
self?.needsDisplay = true
|
||||
|
||||
Reference in New Issue
Block a user