mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Compound Fonts (#834)
* Use CompoundFonts in DesignKit (deprecate ElementFonts). * Use compound fonts everywhere. * Update Authentication snapshots. * Update RoomMembersListScreen snapshots. Delete unused snapshots. * Fix tests.
This commit is contained in:
@@ -108,6 +108,7 @@ struct A11yIdentifiers {
|
||||
let acceptChallenge = "session_verification-accept_challenge"
|
||||
let declineChallenge = "session_verification-decline_challenge"
|
||||
let emojiWrapper = "session_verification-emojis"
|
||||
let verificationComplete = "session_verification-verification_complete"
|
||||
let close = "session_verification-close"
|
||||
}
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ enum FormRowAccessory: View {
|
||||
switch self {
|
||||
case .navigationLink:
|
||||
Image(systemName: "chevron.forward")
|
||||
.font(.element.subheadlineBold)
|
||||
.font(.compound.bodyMD.bold())
|
||||
.foregroundColor(.element.quaternaryContent)
|
||||
case .progressView:
|
||||
ProgressView()
|
||||
case .selection(let isSelected):
|
||||
Image(systemName: isSelected ? "checkmark.circle.fill" : "circle")
|
||||
.font(.element.body)
|
||||
.font(.compound.bodyLG)
|
||||
.foregroundColor(isSelected ? .element.primaryContent : .element.tertiaryContent)
|
||||
}
|
||||
}
|
||||
@@ -95,7 +95,7 @@ struct FormActionButtonStyle: ButtonStyle {
|
||||
|
||||
Text(title)
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
.font(.element.subheadline)
|
||||
.font(.compound.bodyMD)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ struct FormRowLabelStyle: LabelStyle {
|
||||
.background(iconBackgroundColor)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
configuration.title
|
||||
.font(.element.body)
|
||||
.font(.compound.bodyLG)
|
||||
.foregroundColor(titleColor)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ struct FormSectionHeaderStyle: ViewModifier {
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
.font(.element.caption1)
|
||||
.font(.compound.bodyXS)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,13 +35,13 @@ struct AvatarHeaderView<Footer: View>: View {
|
||||
|
||||
Text(name ?? id)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
.font(.element.title1Bold)
|
||||
.font(.compound.headingLGBold)
|
||||
.multilineTextAlignment(.center)
|
||||
|
||||
if let subtitle {
|
||||
Text(subtitle)
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
.font(.element.body)
|
||||
.font(.compound.bodyLG)
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ struct UserProfileCell: View {
|
||||
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text(user.displayName ?? user.userID)
|
||||
.font(.element.title3)
|
||||
.font(.compound.headingSM)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
|
||||
if user.displayName != nil {
|
||||
Text(user.userID)
|
||||
.font(.element.subheadline)
|
||||
.font(.compound.bodyMD)
|
||||
.foregroundColor(.element.tertiaryContent)
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ struct UserIndicatorModalView: View {
|
||||
Image(systemName: iconName)
|
||||
}
|
||||
Text(indicator.title)
|
||||
.font(.element.body)
|
||||
.font(.compound.bodyLG)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ struct UserIndicatorToastView: View {
|
||||
Image(systemName: iconName)
|
||||
}
|
||||
Text(indicator.title)
|
||||
.font(.element.footnote)
|
||||
.font(.compound.bodySM)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
}
|
||||
.id(indicator.id)
|
||||
|
||||
Reference in New Issue
Block a user