mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Draw using proper background color when selected but not emphasized. Fix #152.
This commit is contained in:
@@ -36,6 +36,7 @@ class TimelineTableCellView: NSTableCellView {
|
||||
dateView.emphasized = isEmphasized
|
||||
feedNameView.emphasized = isEmphasized
|
||||
titleView.emphasized = isEmphasized
|
||||
needsDisplay = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +116,14 @@ class TimelineTableCellView: NSTableCellView {
|
||||
|
||||
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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user