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:
Doug
2023-04-25 16:42:06 +01:00
committed by GitHub
parent 8b36e0faa5
commit 5bb2ceedf4
100 changed files with 185 additions and 178 deletions
@@ -54,7 +54,7 @@ struct LoginScreen: View {
/// The header containing a Welcome Back title.
var header: some View {
Text(L10n.screenLoginTitle)
.font(.element.title1Bold)
.font(.compound.headingLGBold)
.multilineTextAlignment(.center)
.foregroundColor(.element.primaryContent)
}
@@ -70,7 +70,7 @@ struct LoginScreen: View {
var loginForm: some View {
VStack(alignment: .leading, spacing: 0) {
Text(L10n.screenLoginFormHeader)
.font(.element.footnote)
.font(.compound.bodySM)
.foregroundColor(.element.primaryContent)
.padding(.horizontal, 16)
.padding(.bottom, 8)
@@ -31,14 +31,14 @@ struct LoginServerInfoSection: View {
var body: some View {
VStack(alignment: .leading, spacing: 8) {
Text(L10n.screenLoginServerHeader)
.font(.element.footnote)
.font(.compound.bodySM)
.foregroundColor(.element.primaryContent)
.padding(.horizontal, 16)
Button(action: editAction) {
HStack {
Text(address)
.font(.element.subheadlineBold)
.font(.compound.bodyMDSemibold)
.foregroundColor(.element.primaryContent)
.padding(.horizontal, 16)
.padding(.vertical)
@@ -46,6 +46,7 @@ struct LoginServerInfoSection: View {
Spacer()
Image(systemName: "chevron.right")
.font(.compound.bodyMD.bold())
.foregroundColor(.element.tertiaryContent)
.padding(.trailing, 16)
}
@@ -44,12 +44,12 @@ struct ServerSelectionScreen: View {
.padding(.bottom, 8)
Text(L10n.commonSelectYourServer)
.font(.element.title2Bold)
.font(.compound.headingMDBold)
.multilineTextAlignment(.center)
.foregroundColor(.element.primaryContent)
Text(L10n.screenChangeServerSubtitle)
.font(.element.subheadline)
.font(.compound.bodyMD)
.multilineTextAlignment(.center)
.foregroundColor(.element.tertiaryContent)
}
@@ -55,20 +55,20 @@ struct SoftLogoutScreen: View {
var header: some View {
VStack(alignment: .leading, spacing: 16) {
Text(UntranslatedL10n.softLogoutSigninTitle)
.font(.element.title2Bold)
.font(.compound.headingMDBold)
.multilineTextAlignment(.leading)
.foregroundColor(.element.primaryContent)
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.title)
Text(UntranslatedL10n.softLogoutSigninNotice(context.viewState.credentials.homeserverName, context.viewState.credentials.userDisplayName, context.viewState.credentials.userId))
.font(.element.body)
.font(.compound.bodyLG)
.multilineTextAlignment(.leading)
.foregroundColor(.element.primaryContent)
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.message)
if context.viewState.showRecoverEncryptionKeysMessage {
Text(UntranslatedL10n.softLogoutSigninE2eWarningNotice)
.font(.element.body)
.font(.compound.bodyLG)
.multilineTextAlignment(.leading)
.foregroundColor(.element.primaryContent)
}
@@ -88,7 +88,7 @@ struct SoftLogoutScreen: View {
Button { context.send(viewAction: .forgotPassword) } label: {
Text(UntranslatedL10n.softLogoutForgotPassword)
.font(.element.body)
.font(.compound.bodyLG)
}
.frame(maxWidth: .infinity, alignment: .trailing)
.padding(.bottom, 8)
@@ -124,13 +124,13 @@ struct SoftLogoutScreen: View {
var clearDataForm: some View {
VStack(alignment: .leading, spacing: 12) {
Text(UntranslatedL10n.softLogoutClearDataTitle)
.font(.element.title2Bold)
.font(.compound.headingMDBold)
.multilineTextAlignment(.leading)
.foregroundColor(.element.primaryContent)
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.clearDataTitle)
Text(UntranslatedL10n.softLogoutClearDataNotice)
.font(.element.body)
.font(.compound.bodyLG)
.multilineTextAlignment(.leading)
.foregroundColor(.element.primaryContent)
.accessibilityIdentifier(A11yIdentifiers.softLogoutScreen.clearDataMessage)