Draw using proper background color when selected but not emphasized. Fix #152.

This commit is contained in:
Brent Simmons 2017-11-12 12:16:27 -08:00
parent b077dfafd1
commit 00ff9016bc
1 changed files with 9 additions and 1 deletions

View File

@ -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()
} }