Search now adds a background highlight to searched items.
This commit is contained in:
@@ -54,7 +54,7 @@ class ProgramsTableViewCell: NSTableCellView {
|
|||||||
field.isBordered = false
|
field.isBordered = false
|
||||||
field.drawsBackground = false
|
field.drawsBackground = false
|
||||||
field.lineBreakMode = .byTruncatingTail
|
field.lineBreakMode = .byTruncatingTail
|
||||||
field.textColor = NSColor.secondaryLabelColor
|
field.textColor = NSColor.textColor
|
||||||
field.translatesAutoresizingMaskIntoConstraints = false
|
field.translatesAutoresizingMaskIntoConstraints = false
|
||||||
return field
|
return field
|
||||||
}()
|
}()
|
||||||
|
|||||||
@@ -480,9 +480,9 @@ class SearchViewController: NSViewController, NSTextFieldDelegate,
|
|||||||
)
|
)
|
||||||
let attributedString = NSMutableAttributedString(string: app)
|
let attributedString = NSMutableAttributedString(string: app)
|
||||||
attributedString
|
attributedString
|
||||||
.addAttributes([.foregroundColor: NSColor.labelColor],
|
.addAttributes([.backgroundColor:
|
||||||
|
NSColor.systemYellow.withAlphaComponent(0.5)],
|
||||||
range: rangeToHighlight)
|
range: rangeToHighlight)
|
||||||
|
|
||||||
cell.titleField.attributedStringValue = attributedString
|
cell.titleField.attributedStringValue = attributedString
|
||||||
cell.progPathLabel.stringValue = program.path
|
cell.progPathLabel.stringValue = program.path
|
||||||
cell.appIconImage.image = program.img
|
cell.appIconImage.image = program.img
|
||||||
|
|||||||
Reference in New Issue
Block a user