Change selected table row text to be white. Issue #693
This commit is contained in:
parent
4ece4173ba
commit
02575c31fe
@ -60,6 +60,10 @@ struct AppAssets {
|
||||
return UIColor(named: "netNewsWireBlueColor")!
|
||||
}()
|
||||
|
||||
static var selectedTextColor: UIColor = {
|
||||
return UIColor(named: "selectedTextColor")!
|
||||
}()
|
||||
|
||||
static var settingsImage: UIImage = {
|
||||
return UIImage(named: "settingsImage")!
|
||||
}()
|
||||
|
@ -105,6 +105,12 @@ class MasterFeedTableViewCell : UITableViewCell {
|
||||
commonInit()
|
||||
}
|
||||
|
||||
override func setSelected(_ selected: Bool, animated: Bool) {
|
||||
titleView.textColor = selected ? AppAssets.selectedTextColor : UIColor.label
|
||||
faviconImageView.tintColor = selected ? AppAssets.selectedTextColor : tintColor
|
||||
super.setSelected(selected, animated: animated)
|
||||
}
|
||||
|
||||
override func willTransition(to state: UITableViewCell.StateMask) {
|
||||
super.willTransition(to: state)
|
||||
showingEditControl = state.contains(.showingEditControl)
|
||||
|
@ -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()
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,20 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"red" : "1.000",
|
||||
"alpha" : "1.000",
|
||||
"blue" : "1.000",
|
||||
"green" : "1.000"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user