1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-26 08:45:25 +01:00

chore(Widget): Make font dynamic sizeable

This commit is contained in:
Marcus Kida 2023-02-06 11:58:23 +01:00
parent 3240a36013
commit 28e5a8fa90
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
2 changed files with 6 additions and 6 deletions

View File

@ -52,7 +52,7 @@ struct FollowersCountWidgetView: View {
.truncationMode(.tail)
Text(account.displayNameWithFallback)
.font(.system(size: 13))
.font(.system(size: UIFontMetrics.default.scaledValue(for: 13)))
.lineLimit(1)
.truncationMode(.tail)
@ -108,7 +108,7 @@ struct FollowersCountWidgetView: View {
Spacer()
if let increaseCount = followersHistory.increaseCountString(for: account) {
Text("\(increaseCount) followers today")
.font(.system(size: 12))
.font(.system(size: UIFontMetrics.default.scaledValue(for: 12)))
.foregroundColor(.secondary)
.lineLimit(1)
.truncationMode(.tail)
@ -135,12 +135,12 @@ struct FollowersCountWidgetView: View {
HStack(alignment: .center) {
Image("BrandIcon")
Text("FOLLOWERS")
.font(.system(size: 15, weight: .semibold))
.font(.system(size: UIFontMetrics.default.scaledValue(for: 15), weight: .semibold))
}
.padding(.top, 6)
Text(account.followersCount.asAbbreviatedCountString())
.font(.system(size: 43))
.font(.system(size: UIFontMetrics.default.scaledValue(for: 43)))
.lineLimit(1)
.truncationMode(.tail)
}
@ -157,7 +157,7 @@ struct FollowersCountWidgetView: View {
Image("BrandIcon")
Text(account.followersCount.asAbbreviatedCountString())
.font(.system(size: 15))
.font(.system(size: UIFontMetrics.default.scaledValue(for: 15)))
.lineLimit(1)
.truncationMode(.tail)
}

View File

@ -109,7 +109,7 @@ struct LatestFollowersWidgetView: View {
.truncationMode(.tail)
}
Text(account.noteWithoutHtmlTags!)
Text(account.noteWithoutHtmlTags ?? "")
.font(.caption)
.lineLimit(1)
.truncationMode(.tail)