fix: disable animations when opening Conjure windows
This commit is contained in:
@@ -132,6 +132,10 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
searchField.stringValue = ""
|
||||
restorePosition()
|
||||
updateResults()
|
||||
if let command {
|
||||
showCommand(command)
|
||||
history.recordLaunch(of: Application(command: command))
|
||||
}
|
||||
window?.deminiaturize(nil)
|
||||
showWindow(nil)
|
||||
NSApp.activate()
|
||||
@@ -140,10 +144,6 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
(window as? LauncherPanel)?.sampleNumberHints()
|
||||
(searchField.currentEditor() as? NSTextView)?.insertionPointColor = SunsetPalette.accent
|
||||
refreshApplications()
|
||||
if let command {
|
||||
showCommand(command)
|
||||
history.recordLaunch(of: Application(command: command))
|
||||
}
|
||||
}
|
||||
|
||||
func toggle(command: Application.Command? = nil) {
|
||||
@@ -869,7 +869,6 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
view.setAccessibilityHidden(true)
|
||||
}
|
||||
controller.view.translatesAutoresizingMaskIntoConstraints = false
|
||||
controller.view.alphaValue = 0
|
||||
content.addSubview(controller.view)
|
||||
NSLayoutConstraint.activate([
|
||||
controller.view.leadingAnchor.constraint(equalTo: content.leadingAnchor),
|
||||
@@ -877,10 +876,6 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
controller.view.topAnchor.constraint(equalTo: searchField.bottomAnchor, constant: 16),
|
||||
controller.view.bottomAnchor.constraint(equalTo: content.bottomAnchor),
|
||||
])
|
||||
NSAnimationContext.runAnimationGroup { context in
|
||||
context.duration = NSWorkspace.shared.accessibilityDisplayShouldReduceMotion ? 0 : 0.18
|
||||
controller.view.animator().alphaValue = 1
|
||||
}
|
||||
window?.makeFirstResponder(searchField)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user