mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Change selected table row text to be white. Issue #693
This commit is contained in:
@@ -44,6 +44,17 @@ class MasterTimelineTableViewCell: UITableViewCell {
|
||||
}
|
||||
}
|
||||
|
||||
override func setSelected(_ selected: Bool, animated: Bool) {
|
||||
let selectedTextColor = selected ? AppAssets.selectedTextColor : UIColor.label
|
||||
titleView.textColor = selectedTextColor
|
||||
summaryView.textColor = selectedTextColor
|
||||
dateView.textColor = selectedTextColor
|
||||
feedNameView.textColor = selectedTextColor
|
||||
unreadIndicatorView.isSelected = selected
|
||||
|
||||
super.setSelected(selected, animated: animated)
|
||||
}
|
||||
|
||||
override func sizeThatFits(_ size: CGSize) -> CGSize {
|
||||
let layout = updatedLayout(width: size.width)
|
||||
return CGSize(width: size.width, height: layout.height)
|
||||
|
||||
@@ -10,6 +10,12 @@ import UIKit
|
||||
|
||||
class MasterUnreadIndicatorView: UIView {
|
||||
|
||||
var isSelected = false {
|
||||
didSet {
|
||||
setNeedsDisplay()
|
||||
}
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
self.isOpaque = false
|
||||
@@ -26,7 +32,11 @@ class MasterUnreadIndicatorView: UIView {
|
||||
}()
|
||||
|
||||
override func draw(_ dirtyRect: CGRect) {
|
||||
AppAssets.timelineUnreadCircleColor.setFill()
|
||||
if isSelected {
|
||||
AppAssets.selectedTextColor.setFill()
|
||||
} else {
|
||||
AppAssets.timelineUnreadCircleColor.setFill()
|
||||
}
|
||||
MasterUnreadIndicatorView.bezierPath.fill()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user