Manually set timeline text cell colors to white when selected and emphasized. (No need on Mojave.) Fix #413.

This commit is contained in:
Brent Simmons 2018-09-04 20:53:19 -07:00
parent db238e8aee
commit d49a0402ec
1 changed files with 15 additions and 11 deletions

View File

@ -189,22 +189,26 @@ private extension TimelineTableCellView {
updateTitleView() updateTitleView()
if #available(macOS 10.14, *) {
makeTextFieldColorsNormal()
}
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 titleView.textColor = NSColor.labelColor
feedNameView.textColor = NSColor.secondaryLabelColor feedNameView.textColor = NSColor.secondaryLabelColor
dateView.textColor = NSColor.secondaryLabelColor dateView.textColor = NSColor.secondaryLabelColor
summaryView.textColor = NSColor.secondaryLabelColor summaryView.textColor = NSColor.secondaryLabelColor
textView.textColor = NSColor.labelColor textView.textColor = NSColor.labelColor
// if isEmphasized && isSelected {
// textFields.forEach { $0.textColor = NSColor.white }
// }
// else {
// feedNameView.textColor = cellAppearance.feedNameColor
// dateView.textColor = cellAppearance.dateColor
// titleView.textColor = cellAppearance.titleColor
// summaryView.textColor = cellAppearance.textColor
// textView.textColor = cellAppearance.textOnlyColor
// }
} }
func updateTextFieldFonts() { func updateTextFieldFonts() {