Manually draw background and selection so that it encompasses the whole row. Issue #2363
This commit is contained in:
parent
b051a4c990
commit
d99f12346d
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue