mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix timeline secondary label coloring
This commit is contained in:
@@ -158,7 +158,7 @@ class MasterFeedTableViewCell : VibrantTableViewCell {
|
||||
UIView.animate(withDuration: duration(animated: animated)) {
|
||||
self.avatarView.tintColor = avatarTintColor
|
||||
}
|
||||
updateLabelVibrancy(titleView, animated: animated)
|
||||
updateLabelVibrancy(titleView, color: labelColor, animated: animated)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,10 +41,10 @@ class MasterTimelineTableViewCell: VibrantTableViewCell {
|
||||
}
|
||||
|
||||
override func updateVibrancy(animated: Bool) {
|
||||
updateLabelVibrancy(titleView, animated: animated)
|
||||
updateLabelVibrancy(summaryView, animated: animated)
|
||||
updateLabelVibrancy(dateView, animated: animated)
|
||||
updateLabelVibrancy(feedNameView, animated: animated)
|
||||
updateLabelVibrancy(titleView, color: labelColor, animated: animated)
|
||||
updateLabelVibrancy(summaryView, color: labelColor, animated: animated)
|
||||
updateLabelVibrancy(dateView, color: secondaryLabelColor, animated: animated)
|
||||
updateLabelVibrancy(feedNameView, color: secondaryLabelColor, animated: animated)
|
||||
|
||||
UIView.animate(withDuration: duration(animated: animated)) {
|
||||
if self.isHighlighted || self.isSelected {
|
||||
|
||||
@@ -15,7 +15,7 @@ class SettingsAccountTableViewCell: VibrantTableViewCell {
|
||||
|
||||
override func updateVibrancy(animated: Bool) {
|
||||
super.updateVibrancy(animated: animated)
|
||||
updateLabelVibrancy(accountNameLabel, animated: animated)
|
||||
updateLabelVibrancy(accountNameLabel, color: labelColor, animated: animated)
|
||||
|
||||
let tintColor = isHighlighted || isSelected ? AppAssets.vibrantTextColor : UIColor.label
|
||||
UIView.animate(withDuration: duration(animated: animated)) {
|
||||
|
||||
@@ -51,18 +51,18 @@ class VibrantTableViewCell: UITableViewCell {
|
||||
|
||||
/// Subclass overrides should call super
|
||||
func updateVibrancy(animated: Bool) {
|
||||
updateLabelVibrancy(textLabel, animated: animated)
|
||||
updateLabelVibrancy(detailTextLabel, animated: animated)
|
||||
updateLabelVibrancy(textLabel, color: labelColor, animated: animated)
|
||||
updateLabelVibrancy(detailTextLabel, color: labelColor, animated: animated)
|
||||
}
|
||||
|
||||
func duration(animated: Bool) -> TimeInterval {
|
||||
return animated ? 0.6 : 0.0
|
||||
}
|
||||
|
||||
func updateLabelVibrancy(_ label: UILabel?, animated: Bool) {
|
||||
func updateLabelVibrancy(_ label: UILabel?, color: UIColor, animated: Bool) {
|
||||
guard let label = label else { return }
|
||||
UIView.transition(with: label, duration: duration(animated: animated), options: .transitionCrossDissolve, animations: {
|
||||
label.textColor = self.labelColor
|
||||
label.textColor = color
|
||||
}, completion: nil)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user