Improve colors.
This commit is contained in:
@@ -4,6 +4,7 @@ class ProgramTableRowView: NSTableRowView {
|
|||||||
override func drawSelection(in dirtyRect: NSRect) {
|
override func drawSelection(in dirtyRect: NSRect) {
|
||||||
if self.selectionHighlightStyle != .none {
|
if self.selectionHighlightStyle != .none {
|
||||||
let selectionColor = NSColor.controlAccentColor
|
let selectionColor = NSColor.controlAccentColor
|
||||||
|
.withAlphaComponent(0.8)
|
||||||
selectionColor.setFill()
|
selectionColor.setFill()
|
||||||
self.bounds.fill()
|
self.bounds.fill()
|
||||||
}
|
}
|
||||||
@@ -26,6 +27,7 @@ class ProgramTableViewCell: NSTableCellView {
|
|||||||
|
|
||||||
public var titleField: NSTextField = {
|
public var titleField: NSTextField = {
|
||||||
let field = NSTextField(labelWithString: "")
|
let field = NSTextField(labelWithString: "")
|
||||||
|
field.textColor = NSColor.secondaryLabelColor
|
||||||
field.lineBreakMode = .byTruncatingTail
|
field.lineBreakMode = .byTruncatingTail
|
||||||
field.translatesAutoresizingMaskIntoConstraints = false
|
field.translatesAutoresizingMaskIntoConstraints = false
|
||||||
return field
|
return field
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class SearchViewController: NSViewController, NSTextFieldDelegate,
|
|||||||
private var settingsButton: NSButton = {
|
private var settingsButton: NSButton = {
|
||||||
let button = NSButton()
|
let button = NSButton()
|
||||||
button.image = systemImage("gearshape.fill", .title2, .large,
|
button.image = systemImage("gearshape.fill", .title2, .large,
|
||||||
.init(paletteColors: [.white, .systemRed]))
|
.init(paletteColors: [.labelColor, .systemRed]))
|
||||||
button.isBordered = false
|
button.isBordered = false
|
||||||
button.action = #selector(openSettings)
|
button.action = #selector(openSettings)
|
||||||
button.sizeToFit()
|
button.sizeToFit()
|
||||||
@@ -367,7 +367,7 @@ class SearchViewController: NSViewController, NSTextFieldDelegate,
|
|||||||
.range(of: searchInput.stringValue.lowercased())
|
.range(of: searchInput.stringValue.lowercased())
|
||||||
let attributedString = NSMutableAttributedString(string: app)
|
let attributedString = NSMutableAttributedString(string: app)
|
||||||
attributedString.addAttributes(
|
attributedString.addAttributes(
|
||||||
[.backgroundColor: NSColor.systemOrange],
|
[.foregroundColor: NSColor.labelColor],
|
||||||
range: rangeToHighlight)
|
range: rangeToHighlight)
|
||||||
|
|
||||||
cell.titleField.attributedStringValue = attributedString
|
cell.titleField.attributedStringValue = attributedString
|
||||||
|
|||||||
Reference in New Issue
Block a user