Draw using proper background color when selected but not emphasized. Fix #152.
This commit is contained in:
parent
b077dfafd1
commit
00ff9016bc
|
@ -36,6 +36,7 @@ class TimelineTableCellView: NSTableCellView {
|
||||||
dateView.emphasized = isEmphasized
|
dateView.emphasized = isEmphasized
|
||||||
feedNameView.emphasized = isEmphasized
|
feedNameView.emphasized = isEmphasized
|
||||||
titleView.emphasized = isEmphasized
|
titleView.emphasized = isEmphasized
|
||||||
|
needsDisplay = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +116,14 @@ class TimelineTableCellView: NSTableCellView {
|
||||||
|
|
||||||
override func draw(_ dirtyRect: NSRect) {
|
override func draw(_ dirtyRect: NSRect) {
|
||||||
|
|
||||||
isSelected ? NSColor.alternateSelectedControlColor.set() : NSColor.white.set()
|
let color: NSColor
|
||||||
|
if isSelected {
|
||||||
|
color = isEmphasized ? NSColor.alternateSelectedControlColor : NSColor.secondarySelectedControlColor
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
color = NSColor.white
|
||||||
|
}
|
||||||
|
color.set()
|
||||||
dirtyRect.fill()
|
dirtyRect.fill()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue