fix: clarify system shortcut conflicts and use emoji command icon

This commit is contained in:
Valdemar Lorenzen
2026-10-15 15:13:58 +02:00
parent 6bb2b4a482
commit da1493a3c8
3 changed files with 14 additions and 3 deletions
+11 -2
View File
@@ -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]