Search now adds a background highlight to searched items.

This commit is contained in:
2026-01-18 09:35:16 -08:00
parent 76eca30e24
commit ff63e31f4c
2 changed files with 4 additions and 4 deletions

View File

@@ -54,7 +54,7 @@ class ProgramsTableViewCell: NSTableCellView {
field.isBordered = false
field.drawsBackground = false
field.lineBreakMode = .byTruncatingTail
field.textColor = NSColor.secondaryLabelColor
field.textColor = NSColor.textColor
field.translatesAutoresizingMaskIntoConstraints = false
return field
}()

View File

@@ -480,9 +480,9 @@ class SearchViewController: NSViewController, NSTextFieldDelegate,
)
let attributedString = NSMutableAttributedString(string: app)
attributedString
.addAttributes([.foregroundColor: NSColor.labelColor],
range: rangeToHighlight)
.addAttributes([.backgroundColor:
NSColor.systemYellow.withAlphaComponent(0.5)],
range: rangeToHighlight)
cell.titleField.attributedStringValue = attributedString
cell.progPathLabel.stringValue = program.path
cell.appIconImage.image = program.img