fix: render light palettes with matching appearance
This commit is contained in:
@@ -81,7 +81,7 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
window.titleVisibility = .hidden
|
||||
window.titlebarAppearsTransparent = true
|
||||
window.animationBehavior = .none
|
||||
window.appearance = NSAppearance(named: .darkAqua)
|
||||
window.appearance = ThemePalette.appearance
|
||||
window.backgroundColor = .clear
|
||||
window.isOpaque = false
|
||||
window.hasShadow = true
|
||||
@@ -403,6 +403,8 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
launcherViews = [header, sectionLabel, scrollView, emptyLabel, footer]
|
||||
themeObservation = ThemeObservation { [weak self, weak content] in
|
||||
guard let self else { return }
|
||||
self.window?.appearance = ThemePalette.appearance
|
||||
self.window?.attachedSheet?.appearance = ThemePalette.appearance
|
||||
self.searchField.applyTheme()
|
||||
(self.searchField.currentEditor() as? NSTextView)?.insertionPointColor = ThemePalette.accent
|
||||
self.searchSymbol.contentTintColor = ThemePalette.accent
|
||||
@@ -767,6 +769,7 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
dismiss()
|
||||
} catch {
|
||||
let alert = NSAlert(error: error)
|
||||
alert.window.appearance = ThemePalette.appearance
|
||||
alert.messageText = "Couldn’t quit \(application.name)"
|
||||
if let window { alert.beginSheetModal(for: window) }
|
||||
}
|
||||
@@ -788,6 +791,7 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
dismiss(restoringFocus: false)
|
||||
} catch {
|
||||
let alert = NSAlert(error: error)
|
||||
alert.window.appearance = ThemePalette.appearance
|
||||
alert.messageText = "Couldn’t open \(application.name)"
|
||||
if let window {
|
||||
await alert.beginSheetModal(for: window)
|
||||
@@ -858,6 +862,7 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
if dismissOnSuccess { dismiss() }
|
||||
} catch {
|
||||
let alert = NSAlert(error: error)
|
||||
alert.window.appearance = ThemePalette.appearance
|
||||
alert.messageText = "Couldn’t run \(Application(command: command).name)"
|
||||
if let window, window.isVisible {
|
||||
await alert.beginSheetModal(for: window)
|
||||
@@ -939,7 +944,7 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
windowSize: previousFrame.size, visibleFrame: window.screen?.visibleFrame ?? previousFrame)
|
||||
window.styleMask = [.borderless]
|
||||
window.minSize = .zero
|
||||
window.appearance = NSAppearance(named: .darkAqua)
|
||||
window.appearance = ThemePalette.appearance
|
||||
window.setFrame(frame, display: true)
|
||||
if let material = content as? NSVisualEffectView { roundMaterialCorners(material, radius: 24) }
|
||||
}
|
||||
@@ -980,7 +985,7 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
if command == .notes {
|
||||
let savedSize = defaults.string(forKey: Self.notesSizeKey).map(NSSizeFromString)
|
||||
?? NSSize(width: 570, height: 404)
|
||||
window?.appearance = nil
|
||||
window?.appearance = ThemePalette.appearance
|
||||
window?.styleMask = [.titled, .closable, .resizable, .fullSizeContentView]
|
||||
window?.minSize = NSSize(width: 570, height: 260)
|
||||
window?.standardWindowButton(.miniaturizeButton)?.isHidden = true
|
||||
|
||||
Reference in New Issue
Block a user