Manually draw background and selection so that it encompasses the whole row. Issue #2363

This commit is contained in:
Maurice C Parker 2020-08-21 16:02:09 -05:00
parent b051a4c990
commit d99f12346d
1 changed files with 15 additions and 0 deletions

View File

@ -34,6 +34,21 @@ class TimelineTableRowView : NSTableRowView {
super.init(coder: coder) super.init(coder: coder)
} }
override func drawBackground(in dirtyRect: NSRect) {
NSColor.controlBackgroundColor.setFill()
dirtyRect.fill()
}
override func drawSelection(in dirtyRect: NSRect) {
if isEmphasized {
NSColor.selectedContentBackgroundColor.setFill()
dirtyRect.fill()
} else {
NSColor.unemphasizedSelectedContentBackgroundColor.setFill()
dirtyRect.fill()
}
}
private var cellView: TimelineTableCellView? { private var cellView: TimelineTableCellView? {
for oneSubview in subviews { for oneSubview in subviews {
if let foundView = oneSubview as? TimelineTableCellView { if let foundView = oneSubview as? TimelineTableCellView {