mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-24 16:51:19 +01:00
Draw a background color for the timeline cell, and make it opaque, so it looks not-weird when dragging.
This commit is contained in:
parent
9f56030b79
commit
861afa06c7
@ -26,7 +26,11 @@ class TimelineTableCellView: NSTableCellView {
|
||||
override var isFlipped: Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
override var isOpaque: Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
var isEmphasized = false {
|
||||
didSet {
|
||||
dateView.emphasized = isEmphasized
|
||||
@ -40,6 +44,7 @@ class TimelineTableCellView: NSTableCellView {
|
||||
dateView.selected = isSelected
|
||||
feedNameView.selected = isSelected
|
||||
titleView.selected = isSelected
|
||||
needsDisplay = true
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,7 +112,13 @@ class TimelineTableCellView: NSTableCellView {
|
||||
dateView.rs_setFrameIfNotEqual(layoutRects.dateRect)
|
||||
feedNameView.rs_setFrameIfNotEqual(layoutRects.feedNameRect)
|
||||
}
|
||||
|
||||
|
||||
override func draw(_ dirtyRect: NSRect) {
|
||||
|
||||
isSelected ? NSColor.alternateSelectedControlColor.set() : NSColor.white.set()
|
||||
dirtyRect.fill()
|
||||
}
|
||||
|
||||
private func updateTitleView() {
|
||||
|
||||
titleView.attributedStringValue = cellData.attributedTitle
|
||||
|
Loading…
Reference in New Issue
Block a user