@@ -910,28 +910,36 @@ final class StatusTableViewController: LoopChartsTableViewController {
910
910
private class MuteAlertsWarningCell : UITableViewCell {
911
911
var formattedAlertMuteEndTime : String = NSLocalizedString ( " Unknown " , comment: " label for when the alert mute end time is unknown " )
912
912
913
+ fileprivate class GradientView : UIView {
914
+ override static var layerClass : AnyClass { CAGradientLayer . self }
915
+ }
916
+
913
917
override func updateConfiguration( using state: UICellConfigurationState ) {
914
918
super. updateConfiguration ( using: state)
915
919
916
920
let adjustViewForNarrowDisplay = bounds. width < 350
917
921
918
922
var contentConfig = defaultContentConfiguration ( ) . updated ( for: state)
919
923
let title = NSMutableAttributedString ( string: NSLocalizedString ( " All Alerts Muted " , comment: " Warning text for when alerts are muted " ) )
920
- contentConfig. image = UIImage ( systemName: " speaker.slash.fill " )
924
+ let image = UIImage ( systemName: " speaker.slash.fill " , withConfiguration: UIImage . SymbolConfiguration ( pointSize: 25 , weight: . thin, scale: . large) )
925
+ contentConfig. image = image
921
926
contentConfig. imageProperties. tintColor = . white
922
927
contentConfig. attributedText = title
923
928
contentConfig. textProperties. color = . white
924
- contentConfig. textProperties. font = . systemFont( ofSize: adjustViewForNarrowDisplay ? 16 : 18 , weight: . bold )
929
+ contentConfig. textProperties. font = . systemFont( ofSize: adjustViewForNarrowDisplay ? 16 : 18 , weight: . semibold )
925
930
contentConfig. textProperties. adjustsFontSizeToFitWidth = true
926
931
contentConfig. secondaryText = String ( format: NSLocalizedString ( " Until %1$@ " , comment: " indication of when alerts will be unmuted (1: time when alerts unmute) " ) , formattedAlertMuteEndTime)
927
932
contentConfig. secondaryTextProperties. color = . white
928
933
contentConfig. secondaryTextProperties. font = . systemFont( ofSize: adjustViewForNarrowDisplay ? 13 : 15 )
929
934
contentConfiguration = contentConfig
930
935
936
+ let backgroundGradient = GradientView ( )
937
+ ( backgroundGradient. layer as? CAGradientLayer ) ? . colors = [ UIColor . warning. cgColor, UIColor . warning. withAlphaComponent ( 0.9 ) . cgColor]
938
+
931
939
var backgroundConfig = backgroundConfiguration? . updated ( for: state)
932
- backgroundConfig? . backgroundColor = . warning . withAlphaComponent ( 0.8 )
940
+ backgroundConfig? . customView = backgroundGradient
933
941
backgroundConfiguration = backgroundConfig
934
- backgroundConfiguration? . backgroundInsets = NSDirectionalEdgeInsets ( top: 0 , leading: 10 , bottom: 5 , trailing: 10 )
942
+ backgroundConfiguration? . backgroundInsets = NSDirectionalEdgeInsets ( top: 0 , leading: 5 , bottom: 5 , trailing: 5 )
935
943
backgroundConfiguration? . cornerRadius = 10
936
944
937
945
let unmuteIndicator = UIImage ( systemName: " stop.circle " ) ? . withTintColor ( . white)
@@ -953,6 +961,7 @@ final class StatusTableViewController: LoopChartsTableViewController {
953
961
} else {
954
962
let cell = tableView. dequeueReusableCell ( withIdentifier: MuteAlertsWarningCell . className, for: indexPath) as! MuteAlertsWarningCell
955
963
cell. formattedAlertMuteEndTime = alertMuter. formattedEndTime
964
+ cell. selectionStyle = . none
956
965
return cell
957
966
}
958
967
case . hud:
0 commit comments