fix: render light palettes with matching appearance

This commit is contained in:
2026-10-22 16:47:58 +02:00
parent 1b171c7b52
commit c0a17f5efe
16 changed files with 467 additions and 27 deletions
@@ -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