From d99f12346d25083a72d798761ff9e3a66e7d1dfa Mon Sep 17 00:00:00 2001 From: Maurice C Parker Date: Fri, 21 Aug 2020 16:02:09 -0500 Subject: [PATCH] Manually draw background and selection so that it encompasses the whole row. Issue #2363 --- .../Timeline/TimelineTableRowView.swift | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Mac/MainWindow/Timeline/TimelineTableRowView.swift b/Mac/MainWindow/Timeline/TimelineTableRowView.swift index aafd39689..e7a78d6a2 100644 --- a/Mac/MainWindow/Timeline/TimelineTableRowView.swift +++ b/Mac/MainWindow/Timeline/TimelineTableRowView.swift @@ -34,6 +34,21 @@ class TimelineTableRowView : NSTableRowView { 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? { for oneSubview in subviews { if let foundView = oneSubview as? TimelineTableCellView {