style: anchor launcher-styled actions above the footer
This commit is contained in:
@@ -53,6 +53,7 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
}
|
||||
actions.closed = { [weak self] in
|
||||
guard let self else { return }
|
||||
self.openButton.keyEquivalent = "\r"
|
||||
if NSApp.isActive { self.window?.makeFirstResponder(self.searchField) }
|
||||
else { self.dismiss(restoringFocus: false) }
|
||||
}
|
||||
@@ -143,7 +144,7 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
}
|
||||
|
||||
func windowDidResignKey(_ notification: Notification) {
|
||||
guard !isLaunching, !actions.isShown, window?.attachedSheet == nil else { return }
|
||||
guard !isLaunching, window?.attachedSheet == nil else { return }
|
||||
dismiss(restoringFocus: false)
|
||||
}
|
||||
|
||||
@@ -495,6 +496,7 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
let application = results[tableView.selectedRow]
|
||||
actions.uninstall = { [weak self] in self?.reviewUninstall(application) }
|
||||
actions.show(for: application, relativeTo: actionsButton)
|
||||
openButton.keyEquivalent = actions.isShown ? "" : "\r"
|
||||
}
|
||||
|
||||
private func reviewUninstall(_ application: Application) {
|
||||
@@ -613,7 +615,7 @@ final class LauncherRowView: NSTableRowView {
|
||||
}
|
||||
|
||||
@MainActor
|
||||
private func roundMaterialCorners(_ view: NSVisualEffectView, radius: CGFloat) {
|
||||
func roundMaterialCorners(_ view: NSVisualEffectView, radius: CGFloat) {
|
||||
let size = NSSize(width: radius * 2 + 1, height: radius * 2 + 1)
|
||||
let mask = NSImage(size: size, flipped: false) { rect in
|
||||
NSColor.black.setFill()
|
||||
|
||||
Reference in New Issue
Block a user