diff --git a/NetNewsWire/MainWindow/Timeline/Cell/TimelineTableCellView.swift b/NetNewsWire/MainWindow/Timeline/Cell/TimelineTableCellView.swift index 5f0b75a29..ae96d608f 100644 --- a/NetNewsWire/MainWindow/Timeline/Cell/TimelineTableCellView.swift +++ b/NetNewsWire/MainWindow/Timeline/Cell/TimelineTableCellView.swift @@ -33,7 +33,6 @@ class TimelineTableCellView: NSTableCellView { var cellAppearance: TimelineCellAppearance! { didSet { if cellAppearance != oldValue { - updateTextFieldColors() updateTextFieldFonts() avatarImageView.layer?.cornerRadius = cellAppearance.avatarCornerRadius needsLayout = true @@ -51,22 +50,6 @@ class TimelineTableCellView: NSTableCellView { return true } - var isEmphasized = false { - didSet { - unreadIndicatorView.isEmphasized = isEmphasized - updateTextFieldColors() - needsDisplay = true - } - } - - var isSelected = false { - didSet { - unreadIndicatorView.isSelected = isSelected - updateTextFieldColors() - needsDisplay = true - } - } - override init(frame frameRect: NSRect) { super.init(frame: frameRect) commonInit() @@ -94,7 +77,6 @@ class TimelineTableCellView: NSTableCellView { override func viewDidMoveToSuperview() { updateSubviews() - updateAppearance() } override func layout() { @@ -164,20 +146,6 @@ private extension TimelineTableCellView { } } - func updateTextFieldColors() { - if #available(macOS 10.14, *) { - } - else { - // Pre-Mojave: manually set colors to white when needed. - if isEmphasized && isSelected { - textFields.forEach { $0.textColor = NSColor.white } - } - else { - makeTextFieldColorsNormal() - } - } - } - func makeTextFieldColorsNormal() { titleView.textColor = NSColor.labelColor feedNameView.textColor = NSColor.secondaryLabelColor @@ -220,18 +188,6 @@ private extension TimelineTableCellView { return TimelineCellLayout(width: bounds.width, height: bounds.height, cellData: cellData, appearance: cellAppearance, hasAvatar: avatarImageView.image != nil) } - func updateAppearance() { - - if let rowView = superview as? NSTableRowView { - isEmphasized = rowView.isEmphasized - isSelected = rowView.isSelected - } - else { - isEmphasized = false - isSelected = false - } - } - func updateTitleView() { updateTextFieldText(titleView, cellData?.title) diff --git a/NetNewsWire/MainWindow/Timeline/Cell/UnreadIndicatorView.swift b/NetNewsWire/MainWindow/Timeline/Cell/UnreadIndicatorView.swift index 99cd00253..70421e993 100644 --- a/NetNewsWire/MainWindow/Timeline/Cell/UnreadIndicatorView.swift +++ b/NetNewsWire/MainWindow/Timeline/Cell/UnreadIndicatorView.swift @@ -16,34 +16,9 @@ class UnreadIndicatorView: NSView { let r = NSRect(x: 0.0, y: 0.0, width: unreadCircleDimension, height: unreadCircleDimension) return NSBezierPath(ovalIn: r) }() - - static let unreadCircleColor = appDelegate.currentTheme.color(forKey: "MainWindow.Timeline.cell.unreadCircleColor") - - var isEmphasized = false { - didSet { - if isEmphasized != oldValue { - needsDisplay = true - } - } - } - - var isSelected = false { - didSet { - if isSelected != oldValue { - needsDisplay = true - } - } - } override func draw(_ dirtyRect: NSRect) { - - if #available(OSX 10.14, *) { - let color = isEmphasized && isSelected ? NSColor.white : NSColor.controlAccentColor - color.setFill() - } else { - let color = isEmphasized && isSelected ? NSColor.white : NSColor.systemBlue - color.setFill() - } + NSColor.controlAccentColor.setFill() UnreadIndicatorView.bezierPath.fill() } diff --git a/NetNewsWire/MainWindow/Timeline/TimelineTableRowView.swift b/NetNewsWire/MainWindow/Timeline/TimelineTableRowView.swift index 6db9514d8..692f0a19c 100644 --- a/NetNewsWire/MainWindow/Timeline/TimelineTableRowView.swift +++ b/NetNewsWire/MainWindow/Timeline/TimelineTableRowView.swift @@ -27,25 +27,4 @@ class TimelineTableRowView : NSTableRowView { return nil } - override var isEmphasized: Bool { - didSet { - if #available(macOS 10.14, *) { - return - } - if let cellView = cellView { - cellView.isEmphasized = isEmphasized - } - } - } - - override var isSelected: Bool { - didSet { - if #available(macOS 10.14, *) { - return - } - if let cellView = cellView { - cellView.isSelected = isSelected - } - } - } }