fix: clarify system shortcut conflicts and use emoji command icon
This commit is contained in:
@@ -38,6 +38,14 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
private var isCommandOpen: Bool { translation != nil || emojiPicker != nil }
|
||||
private var activeCommand: Application.Command?
|
||||
private var pendingPresentation: (() -> Void)?
|
||||
private static let emojiIcon: NSImage = {
|
||||
let text = NSAttributedString(string: "🤔", attributes: [.font: NSFont.systemFont(ofSize: 28)])
|
||||
let size = text.size()
|
||||
return NSImage(size: size, flipped: false) { _ in
|
||||
text.draw(at: .zero)
|
||||
return true
|
||||
}
|
||||
}()
|
||||
|
||||
init(history: LaunchHistory = LaunchHistory(), uninstaller: ApplicationUninstaller = ApplicationUninstaller()) {
|
||||
self.history = history
|
||||
@@ -600,8 +608,9 @@ final class LauncherWindowController: NSWindowController, NSWindowDelegate, NSSe
|
||||
cell.locationLabel.isHidden = true
|
||||
cell.kindLabel.attributedStringValue = history.isFavorite(entry)
|
||||
? ApplicationCell.favoriteCommandKind : ApplicationCell.commandKind
|
||||
cell.imageView?.image = NSImage(systemSymbolName: entry.command == .emoji ? "face.smiling" : "character.bubble", accessibilityDescription: nil)
|
||||
cell.imageView?.contentTintColor = SunsetPalette.accent
|
||||
cell.imageView?.image = entry.command == .emoji ? Self.emojiIcon
|
||||
: NSImage(systemSymbolName: "character.bubble", accessibilityDescription: nil)
|
||||
cell.imageView?.contentTintColor = entry.command == .emoji ? nil : SunsetPalette.accent
|
||||
cell.toolTip = entry.command == .emoji ? "Search and copy emoji" : "Translate English to Japanese"
|
||||
} else {
|
||||
let application = results[row]
|
||||
|
||||
Reference in New Issue
Block a user