From 590b9f0bccb8e27dac041574d58ec9aea4ae5881 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Fri, 4 Nov 2022 21:53:59 -0400 Subject: [PATCH] Dynamic type support on notifications screen --- .../ActionNotificationGroupTableViewCell.swift | 7 +++++++ .../ActionNotificationGroupTableViewCell.xib | 17 +++++++++-------- .../FollowNotificationGroupTableViewCell.swift | 7 +++++++ .../FollowNotificationGroupTableViewCell.xib | 11 ++++++----- ...FollowRequestNotificationTableViewCell.swift | 7 +++++++ .../FollowRequestNotificationTableViewCell.xib | 13 +++++++------ .../PollFinishedTableViewCell.swift | 14 ++++++++++++++ .../Notifications/PollFinishedTableViewCell.xib | 15 ++++++++------- 8 files changed, 65 insertions(+), 26 deletions(-) diff --git a/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.swift b/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.swift index 04dd06a9..d8ac6193 100644 --- a/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.swift +++ b/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.swift @@ -35,6 +35,13 @@ class ActionNotificationGroupTableViewCell: UITableViewCell { override func awakeFromNib() { super.awakeFromNib() + timestampLabel.font = UIFont(descriptor: .preferredFontDescriptor(withTextStyle: .body).addingAttributes([ + .traits: [ + UIFontDescriptor.TraitKey.weight: UIFont.Weight.light.rawValue, + ] + ]), size: 0) + timestampLabel.adjustsFontForContentSizeCategory = true + actionLabel.combiner = self.updateActionLabel NotificationCenter.default.addObserver(self, selector: #selector(updateUIForPreferences), name: .preferencesChanged, object: nil) diff --git a/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.xib b/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.xib index 19aa164b..69110007 100644 --- a/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.xib +++ b/Tusker/Views/Notifications/ActionNotificationGroupTableViewCell.xib @@ -1,8 +1,9 @@ - + - + + @@ -40,15 +41,15 @@ -