From aff2e80ea9e54a1002b72dbb6a3d56e163cdc8fa Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Tue, 3 Jan 2023 15:03:03 +0100 Subject: [PATCH 01/12] refactor(MailTextStyle): Header1 --- Mail/Views/NoMailboxView.swift | 2 +- MailCore/Utils/MailTextStyle.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mail/Views/NoMailboxView.swift b/Mail/Views/NoMailboxView.swift index fde24b697..ab7ea98f1 100644 --- a/Mail/Views/NoMailboxView.swift +++ b/Mail/Views/NoMailboxView.swift @@ -30,7 +30,7 @@ struct NoMailboxView: View { .frame(width: 110, height: 110) .padding(.bottom, 56) Text(MailResourcesStrings.Localizable.noMailboxTitle) - .textStyle(.header1) + .textStyle(.header2) .padding(.horizontal, 48) .padding(.bottom, 16) Text(MailResourcesStrings.Localizable.noMailboxDescription) diff --git a/MailCore/Utils/MailTextStyle.swift b/MailCore/Utils/MailTextStyle.swift index e5006f8f2..4ad28a7ad 100644 --- a/MailCore/Utils/MailTextStyle.swift +++ b/MailCore/Utils/MailTextStyle.swift @@ -56,7 +56,7 @@ public struct MailTextStyle { } public static let header1 = MailTextStyle( - font: .system(size: 21.5, weight: .bold), + font: .system(size: 22, weight: .semibold), color: MailResourcesAsset.primaryTextColor ) From d659e47d1e92170bc5d15effbffda8197dcda6fa Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Tue, 3 Jan 2023 15:03:25 +0100 Subject: [PATCH 02/12] refactor(MailTextStyle): Header2 --- MailCore/Utils/MailTextStyle.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MailCore/Utils/MailTextStyle.swift b/MailCore/Utils/MailTextStyle.swift index 4ad28a7ad..583312612 100644 --- a/MailCore/Utils/MailTextStyle.swift +++ b/MailCore/Utils/MailTextStyle.swift @@ -61,7 +61,7 @@ public struct MailTextStyle { ) public static let header2 = MailTextStyle( - font: .system(size: 17.5, weight: .bold), + font: .system(size: 18, weight: .semibold), color: MailResourcesAsset.primaryTextColor ) From 0c4803dd79e9669a798c8ca18bab0f2a0e94c91a Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Tue, 3 Jan 2023 16:15:12 +0100 Subject: [PATCH 03/12] refactor(MailTextStyle): Remove header3 --- Mail/Views/Menu Drawer/MailboxQuotaView.swift | 11 ++--------- Mail/Views/Switch User/AccountView.swift | 2 +- Mail/Views/TextStylePreview.swift | 4 ---- MailCore/Utils/MailTextStyle.swift | 9 --------- 4 files changed, 3 insertions(+), 23 deletions(-) diff --git a/Mail/Views/Menu Drawer/MailboxQuotaView.swift b/Mail/Views/Menu Drawer/MailboxQuotaView.swift index 76141d377..8b395cb45 100644 --- a/Mail/Views/Menu Drawer/MailboxQuotaView.swift +++ b/Mail/Views/Menu Drawer/MailboxQuotaView.swift @@ -25,18 +25,11 @@ struct MailboxQuotaView: View { @EnvironmentObject var globalSheet: GlobalBottomSheet let quotas: Quotas - var progressString: AttributedString { - let localizedText = MailResourcesStrings.Localizable.menuDrawerMailboxStorage( + var progressString: String { + return MailResourcesStrings.Localizable.menuDrawerMailboxStorage( Int64(quotas.size * 1000).formatted(.defaultByteCount), Constants.sizeLimit.formatted(.defaultByteCount) ) - - var attributedString = AttributedString(localizedText) - if let lastWord = localizedText.split(separator: " ").last, let range = attributedString.range(of: lastWord) { - attributedString[range].font = MailTextStyle.header3.font - } - - return attributedString } var body: some View { diff --git a/Mail/Views/Switch User/AccountView.swift b/Mail/Views/Switch User/AccountView.swift index 60e8c43d3..9575a11c0 100644 --- a/Mail/Views/Switch User/AccountView.swift +++ b/Mail/Views/Switch User/AccountView.swift @@ -81,7 +81,7 @@ struct AccountView: View { VStack(spacing: 8) { Text(account.user.email) - .textStyle(.header3) + .textStyle(.header2) NavigationLink { AccountListView() diff --git a/Mail/Views/TextStylePreview.swift b/Mail/Views/TextStylePreview.swift index 024c8771f..2c0147701 100644 --- a/Mail/Views/TextStylePreview.swift +++ b/Mail/Views/TextStylePreview.swift @@ -28,10 +28,6 @@ struct TextStylePreview: View { .textStyle(.header1) Text("Header 2") .textStyle(.header2) - Text("Header 3") - .textStyle(.header3) - Text("Header 3 secondary") - .textStyle(.header3Secondary) Text("Body") .textStyle(.body) Text("Body secondary") diff --git a/MailCore/Utils/MailTextStyle.swift b/MailCore/Utils/MailTextStyle.swift index 583312612..422b9ccd3 100644 --- a/MailCore/Utils/MailTextStyle.swift +++ b/MailCore/Utils/MailTextStyle.swift @@ -65,15 +65,6 @@ public struct MailTextStyle { color: MailResourcesAsset.primaryTextColor ) - public static let header3 = MailTextStyle( - font: .system(size: 17.5), - color: MailResourcesAsset.primaryTextColor - ) - - public static let header3Secondary = MailTextStyle( - font: .system(size: 17.5), - color: MailResourcesAsset.secondaryTextColor - ) public static let header4 = MailTextStyle( font: .system(size: 15.5, weight: .bold), From 62d04e9f5aacb28365633639d10a8ac4c9f12ac6 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Tue, 3 Jan 2023 16:16:57 +0100 Subject: [PATCH 04/12] refactor(MailTextStyle): Remove header4 --- Mail/Views/Bottom sheets/CreateFolderView.swift | 2 +- Mail/Views/Bottom sheets/MoreStorageView.swift | 2 +- Mail/Views/Bottom sheets/MoveEmailView.swift | 2 +- Mail/Views/Bottom sheets/ReportDisplayProblemView.swift | 2 +- Mail/Views/Bottom sheets/ReportPhishingView.swift | 2 +- Mail/Views/Bottom sheets/RestoreEmailsView.swift | 2 +- Mail/Views/Switch User/AccountCellView.swift | 2 +- MailCore/Utils/MailTextStyle.swift | 5 ----- 8 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Mail/Views/Bottom sheets/CreateFolderView.swift b/Mail/Views/Bottom sheets/CreateFolderView.swift index a7ee61d18..9b466b546 100644 --- a/Mail/Views/Bottom sheets/CreateFolderView.swift +++ b/Mail/Views/Bottom sheets/CreateFolderView.swift @@ -62,7 +62,7 @@ struct CreateFolderView: View { // Header Text(MailResourcesStrings.Localizable.createFolderTitle) .frame(maxWidth: .infinity, alignment: .leading) - .textStyle(.header4) + .textStyle(.header5) // Text field TextField(MailResourcesStrings.Localizable.createFolderName, text: $folderName) .padding(12) diff --git a/Mail/Views/Bottom sheets/MoreStorageView.swift b/Mail/Views/Bottom sheets/MoreStorageView.swift index e81b1a63b..282af8d82 100644 --- a/Mail/Views/Bottom sheets/MoreStorageView.swift +++ b/Mail/Views/Bottom sheets/MoreStorageView.swift @@ -26,7 +26,7 @@ struct MoreStorageView: View { var body: some View { VStack(alignment: .leading) { Text(MailResourcesStrings.Localizable.moreStorageTitle) - .textStyle(.header4) + .textStyle(.header5) Image(resource: MailResourcesAsset.moreStorage) .resizable() diff --git a/Mail/Views/Bottom sheets/MoveEmailView.swift b/Mail/Views/Bottom sheets/MoveEmailView.swift index 04a5fb630..8f94eee5d 100644 --- a/Mail/Views/Bottom sheets/MoveEmailView.swift +++ b/Mail/Views/Bottom sheets/MoveEmailView.swift @@ -58,7 +58,7 @@ struct MoveEmailView: View { VStack(alignment: .trailing, spacing: 24) { Text(MailResourcesStrings.Localizable.moveTitle) .frame(maxWidth: .infinity, alignment: .leading) - .textStyle(.header4) + .textStyle(.header5) Image(resource: MailResourcesAsset.moveIllu) .resizable() .scaledToFit() diff --git a/Mail/Views/Bottom sheets/ReportDisplayProblemView.swift b/Mail/Views/Bottom sheets/ReportDisplayProblemView.swift index dbd51f879..67ec96437 100644 --- a/Mail/Views/Bottom sheets/ReportDisplayProblemView.swift +++ b/Mail/Views/Bottom sheets/ReportDisplayProblemView.swift @@ -30,7 +30,7 @@ struct ReportDisplayProblemView: View { var body: some View { VStack(spacing: 16) { Text(MailResourcesStrings.Localizable.reportDisplayProblemTitle) - .textStyle(.header4) + .textStyle(.header5) .frame(maxWidth: .infinity, alignment: .leading) Image(resource: MailResourcesAsset.displayIssue) Text(MailResourcesStrings.Localizable.reportDisplayProblemDescription) diff --git a/Mail/Views/Bottom sheets/ReportPhishingView.swift b/Mail/Views/Bottom sheets/ReportPhishingView.swift index 544057175..c4fc59be3 100644 --- a/Mail/Views/Bottom sheets/ReportPhishingView.swift +++ b/Mail/Views/Bottom sheets/ReportPhishingView.swift @@ -29,7 +29,7 @@ struct ReportPhishingView: View { var body: some View { VStack(spacing: 16) { Text(MailResourcesStrings.Localizable.reportPhishingTitle) - .textStyle(.header4) + .textStyle(.header5) .frame(maxWidth: .infinity, alignment: .leading) Image(resource: MailResourcesAsset.phishing) Text(MailResourcesStrings.Localizable.reportPhishingDescription) diff --git a/Mail/Views/Bottom sheets/RestoreEmailsView.swift b/Mail/Views/Bottom sheets/RestoreEmailsView.swift index 4cd12ad77..96fbf52e8 100644 --- a/Mail/Views/Bottom sheets/RestoreEmailsView.swift +++ b/Mail/Views/Bottom sheets/RestoreEmailsView.swift @@ -33,7 +33,7 @@ struct RestoreEmailsView: View { var body: some View { VStack(alignment: .leading) { Text(MailResourcesStrings.Localizable.restoreEmailsTitle) - .textStyle(.header4) + .textStyle(.header5) .padding(.bottom, 16) Text(MailResourcesStrings.Localizable.restoreEmailsText) diff --git a/Mail/Views/Switch User/AccountCellView.swift b/Mail/Views/Switch User/AccountCellView.swift index 408fb0fcb..804267005 100644 --- a/Mail/Views/Switch User/AccountCellView.swift +++ b/Mail/Views/Switch User/AccountCellView.swift @@ -79,7 +79,7 @@ struct AccountHeaderCell: View { VStack(alignment: .leading, spacing: 2) { Text(account.user.displayName) - .textStyle(.header4) + .textStyle(.header5) Text(account.user.email) .textStyle(.callout) } diff --git a/MailCore/Utils/MailTextStyle.swift b/MailCore/Utils/MailTextStyle.swift index 422b9ccd3..4d586e850 100644 --- a/MailCore/Utils/MailTextStyle.swift +++ b/MailCore/Utils/MailTextStyle.swift @@ -66,11 +66,6 @@ public struct MailTextStyle { ) - public static let header4 = MailTextStyle( - font: .system(size: 15.5, weight: .bold), - color: MailResourcesAsset.primaryTextColor - ) - public static let header5 = MailTextStyle( font: .system(size: 15.5, weight: .medium), color: MailResourcesAsset.primaryTextColor From 605712430edf6d96ec017c5b467f0c5fa659e265 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Tue, 3 Jan 2023 16:52:26 +0100 Subject: [PATCH 05/12] refactor(MailTextStyle): Change header5 for bodyMedium --- Mail/Components/ThreadCell.swift | 2 +- Mail/Views/Bottom sheets/Actions/ActionsView.swift | 2 +- Mail/Views/Bottom sheets/AddLinkView.swift | 2 +- Mail/Views/Bottom sheets/ContactActionsView.swift | 2 +- Mail/Views/Bottom sheets/CreateFolderView.swift | 2 +- Mail/Views/Bottom sheets/LogoutConfirmationView.swift | 2 +- Mail/Views/Bottom sheets/MoreStorageView.swift | 2 +- Mail/Views/Bottom sheets/MoveEmailView.swift | 2 +- Mail/Views/Bottom sheets/ReportDisplayProblemView.swift | 2 +- Mail/Views/Bottom sheets/ReportPhishingView.swift | 2 +- Mail/Views/Bottom sheets/RestoreEmailsView.swift | 2 +- Mail/Views/Menu Drawer/Folders/FolderCell.swift | 2 +- Mail/Views/Menu Drawer/Items/MenuDrawerItemCell.swift | 2 +- Mail/Views/Menu Drawer/MailboxQuotaView.swift | 2 +- Mail/Views/Search/SearchFilterCell.swift | 2 +- Mail/Views/Search/SearchFilterFolderCell.swift | 2 +- Mail/Views/Switch User/AccountCellView.swift | 2 +- Mail/Views/Thread/MessageHeaderSummaryView.swift | 2 +- MailCore/Utils/MailTextStyle.swift | 7 +++---- 19 files changed, 21 insertions(+), 22 deletions(-) diff --git a/Mail/Components/ThreadCell.swift b/Mail/Components/ThreadCell.swift index 883a1c607..c06dceb37 100644 --- a/Mail/Components/ThreadCell.swift +++ b/Mail/Components/ThreadCell.swift @@ -125,7 +125,7 @@ struct ThreadCell: View { .layoutPriority(1) } Text(thread.messages.allSatisfy(\.isDraft) ? thread.formattedTo : thread.formattedFrom) - .textStyle(.header5) + .textStyle(.header2) .lineLimit(1) if thread.messages.count > 1 { diff --git a/Mail/Views/Bottom sheets/Actions/ActionsView.swift b/Mail/Views/Bottom sheets/Actions/ActionsView.swift index 4f163f53a..72012e558 100644 --- a/Mail/Views/Bottom sheets/Actions/ActionsView.swift +++ b/Mail/Views/Bottom sheets/Actions/ActionsView.swift @@ -42,7 +42,7 @@ struct ActionsView: View { // Header Text(MailResourcesStrings.Localizable.actionsMenuTitle) .frame(maxWidth: .infinity, alignment: .leading) - .textStyle(.header5) + .textStyle(.bodyMedium) .padding(.horizontal, 24) // Quick actions HStack(alignment: .top, spacing: 28) { diff --git a/Mail/Views/Bottom sheets/AddLinkView.swift b/Mail/Views/Bottom sheets/AddLinkView.swift index c144bd59b..38fcf33e5 100644 --- a/Mail/Views/Bottom sheets/AddLinkView.swift +++ b/Mail/Views/Bottom sheets/AddLinkView.swift @@ -32,7 +32,7 @@ struct AddLinkView: View { var body: some View { VStack(alignment: .leading, spacing: 24) { Text(MailResourcesStrings.Localizable.urlEntryTitle) - .textStyle(.header5) + .textStyle(.bodyMedium) TextField(MailResourcesStrings.Localizable.urlPlaceholder, text: $url) .textFieldStyle(.roundedBorder) .focused($isFocused) diff --git a/Mail/Views/Bottom sheets/ContactActionsView.swift b/Mail/Views/Bottom sheets/ContactActionsView.swift index fe7bc673d..ccf7e841f 100644 --- a/Mail/Views/Bottom sheets/ContactActionsView.swift +++ b/Mail/Views/Bottom sheets/ContactActionsView.swift @@ -59,7 +59,7 @@ struct ContactActionsView: View { RecipientImage(recipient: recipient, size: 32) VStack(alignment: .leading) { Text(recipient.contact?.name ?? recipient.title) - .textStyle(.header5) + .textStyle(.bodyMedium) Text(recipient.contact?.email ?? recipient.email) .textStyle(.bodySecondary) } diff --git a/Mail/Views/Bottom sheets/CreateFolderView.swift b/Mail/Views/Bottom sheets/CreateFolderView.swift index 9b466b546..8cd1e07da 100644 --- a/Mail/Views/Bottom sheets/CreateFolderView.swift +++ b/Mail/Views/Bottom sheets/CreateFolderView.swift @@ -62,7 +62,7 @@ struct CreateFolderView: View { // Header Text(MailResourcesStrings.Localizable.createFolderTitle) .frame(maxWidth: .infinity, alignment: .leading) - .textStyle(.header5) + .textStyle(.bodyMedium) // Text field TextField(MailResourcesStrings.Localizable.createFolderName, text: $folderName) .padding(12) diff --git a/Mail/Views/Bottom sheets/LogoutConfirmationView.swift b/Mail/Views/Bottom sheets/LogoutConfirmationView.swift index e59c01b0f..37b2cc02a 100644 --- a/Mail/Views/Bottom sheets/LogoutConfirmationView.swift +++ b/Mail/Views/Bottom sheets/LogoutConfirmationView.swift @@ -32,7 +32,7 @@ struct LogoutConfirmationView: View { var body: some View { VStack(alignment: .leading, spacing: 24) { Text( MailResourcesStrings.Localizable.confirmLogoutTitle(account.user.email)) - .textStyle(.header5) + .textStyle(.bodyMedium) Text(MailResourcesStrings.Localizable.confirmLogoutDescription) .textStyle(.bodySecondary) BottomSheetButtonsView(primaryButtonTitle: MailResourcesStrings.Localizable.buttonLogout, diff --git a/Mail/Views/Bottom sheets/MoreStorageView.swift b/Mail/Views/Bottom sheets/MoreStorageView.swift index 282af8d82..2e41406ad 100644 --- a/Mail/Views/Bottom sheets/MoreStorageView.swift +++ b/Mail/Views/Bottom sheets/MoreStorageView.swift @@ -26,7 +26,7 @@ struct MoreStorageView: View { var body: some View { VStack(alignment: .leading) { Text(MailResourcesStrings.Localizable.moreStorageTitle) - .textStyle(.header5) + .textStyle(.bodyMedium) Image(resource: MailResourcesAsset.moreStorage) .resizable() diff --git a/Mail/Views/Bottom sheets/MoveEmailView.swift b/Mail/Views/Bottom sheets/MoveEmailView.swift index 8f94eee5d..a62e88896 100644 --- a/Mail/Views/Bottom sheets/MoveEmailView.swift +++ b/Mail/Views/Bottom sheets/MoveEmailView.swift @@ -58,7 +58,7 @@ struct MoveEmailView: View { VStack(alignment: .trailing, spacing: 24) { Text(MailResourcesStrings.Localizable.moveTitle) .frame(maxWidth: .infinity, alignment: .leading) - .textStyle(.header5) + .textStyle(.bodyMedium) Image(resource: MailResourcesAsset.moveIllu) .resizable() .scaledToFit() diff --git a/Mail/Views/Bottom sheets/ReportDisplayProblemView.swift b/Mail/Views/Bottom sheets/ReportDisplayProblemView.swift index 67ec96437..c4c0cc771 100644 --- a/Mail/Views/Bottom sheets/ReportDisplayProblemView.swift +++ b/Mail/Views/Bottom sheets/ReportDisplayProblemView.swift @@ -30,7 +30,7 @@ struct ReportDisplayProblemView: View { var body: some View { VStack(spacing: 16) { Text(MailResourcesStrings.Localizable.reportDisplayProblemTitle) - .textStyle(.header5) + .textStyle(.bodyMedium) .frame(maxWidth: .infinity, alignment: .leading) Image(resource: MailResourcesAsset.displayIssue) Text(MailResourcesStrings.Localizable.reportDisplayProblemDescription) diff --git a/Mail/Views/Bottom sheets/ReportPhishingView.swift b/Mail/Views/Bottom sheets/ReportPhishingView.swift index c4fc59be3..5d446264b 100644 --- a/Mail/Views/Bottom sheets/ReportPhishingView.swift +++ b/Mail/Views/Bottom sheets/ReportPhishingView.swift @@ -29,7 +29,7 @@ struct ReportPhishingView: View { var body: some View { VStack(spacing: 16) { Text(MailResourcesStrings.Localizable.reportPhishingTitle) - .textStyle(.header5) + .textStyle(.bodyMedium) .frame(maxWidth: .infinity, alignment: .leading) Image(resource: MailResourcesAsset.phishing) Text(MailResourcesStrings.Localizable.reportPhishingDescription) diff --git a/Mail/Views/Bottom sheets/RestoreEmailsView.swift b/Mail/Views/Bottom sheets/RestoreEmailsView.swift index 96fbf52e8..b691bed3d 100644 --- a/Mail/Views/Bottom sheets/RestoreEmailsView.swift +++ b/Mail/Views/Bottom sheets/RestoreEmailsView.swift @@ -33,7 +33,7 @@ struct RestoreEmailsView: View { var body: some View { VStack(alignment: .leading) { Text(MailResourcesStrings.Localizable.restoreEmailsTitle) - .textStyle(.header5) + .textStyle(.bodyMedium) .padding(.bottom, 16) Text(MailResourcesStrings.Localizable.restoreEmailsText) diff --git a/Mail/Views/Menu Drawer/Folders/FolderCell.swift b/Mail/Views/Menu Drawer/Folders/FolderCell.swift index ac7c7d3af..6c51dc0f3 100644 --- a/Mail/Views/Menu Drawer/Folders/FolderCell.swift +++ b/Mail/Views/Menu Drawer/Folders/FolderCell.swift @@ -78,7 +78,7 @@ struct FolderCellContent: View { } private var textStyle: MailTextStyle { - isSelected ? .header5Accent : .header5 + isSelected ? .header5Accent : .bodyMedium } var body: some View { diff --git a/Mail/Views/Menu Drawer/Items/MenuDrawerItemCell.swift b/Mail/Views/Menu Drawer/Items/MenuDrawerItemCell.swift index 1e22c11bb..a5283b2d9 100644 --- a/Mail/Views/Menu Drawer/Items/MenuDrawerItemCell.swift +++ b/Mail/Views/Menu Drawer/Items/MenuDrawerItemCell.swift @@ -34,7 +34,7 @@ struct MenuDrawerItemCell: View { .foregroundColor(.accentColor) Text(content.label) - .textStyle(.header5) + .textStyle(.bodyMedium) } .frame(maxWidth: .infinity, alignment: .leading) } diff --git a/Mail/Views/Menu Drawer/MailboxQuotaView.swift b/Mail/Views/Menu Drawer/MailboxQuotaView.swift index 8b395cb45..0a01ef12b 100644 --- a/Mail/Views/Menu Drawer/MailboxQuotaView.swift +++ b/Mail/Views/Menu Drawer/MailboxQuotaView.swift @@ -40,7 +40,7 @@ struct MailboxQuotaView: View { VStack(alignment: .leading, spacing: 6) { Text(progressString) - .textStyle(.header5) + .textStyle(.bodyMedium) } Spacer() diff --git a/Mail/Views/Search/SearchFilterCell.swift b/Mail/Views/Search/SearchFilterCell.swift index 4a6d44d29..85a922032 100644 --- a/Mail/Views/Search/SearchFilterCell.swift +++ b/Mail/Views/Search/SearchFilterCell.swift @@ -33,7 +33,7 @@ struct SearchFilterCell: View { .frame(width: 13, height: 13) } Text(title) - .font(MailTextStyle.header5.font) + .font(MailTextStyle.bodyMedium.font) } .filterCellStyle(isSelected: isSelected) } diff --git a/Mail/Views/Search/SearchFilterFolderCell.swift b/Mail/Views/Search/SearchFilterFolderCell.swift index d5e7ea01b..65682b110 100644 --- a/Mail/Views/Search/SearchFilterFolderCell.swift +++ b/Mail/Views/Search/SearchFilterFolderCell.swift @@ -68,7 +68,7 @@ struct SearchFilterFolderCell: View { .frame(width: 13, height: 13) } Text(selectedFolderName) - .font(MailTextStyle.header5.font) + .font(MailTextStyle.bodyMedium.font) Image(resource: MailResourcesAsset.arrowDown) .resizable() .frame(width: 13, height: 13) diff --git a/Mail/Views/Switch User/AccountCellView.swift b/Mail/Views/Switch User/AccountCellView.swift index 804267005..1301c3f2b 100644 --- a/Mail/Views/Switch User/AccountCellView.swift +++ b/Mail/Views/Switch User/AccountCellView.swift @@ -79,7 +79,7 @@ struct AccountHeaderCell: View { VStack(alignment: .leading, spacing: 2) { Text(account.user.displayName) - .textStyle(.header5) + .textStyle(.bodyMedium) Text(account.user.email) .textStyle(.callout) } diff --git a/Mail/Views/Thread/MessageHeaderSummaryView.swift b/Mail/Views/Thread/MessageHeaderSummaryView.swift index 2eb160f99..3217210d9 100644 --- a/Mail/Views/Thread/MessageHeaderSummaryView.swift +++ b/Mail/Views/Thread/MessageHeaderSummaryView.swift @@ -61,7 +61,7 @@ struct MessageHeaderSummaryView: View { ForEach(message.from, id: \.self) { recipient in Text(recipient.title) .lineLimit(1) - .textStyle(.header5) + .textStyle(.bodyMedium) } } Text(message.date.customRelativeFormatted) diff --git a/MailCore/Utils/MailTextStyle.swift b/MailCore/Utils/MailTextStyle.swift index 4d586e850..bc2595fc7 100644 --- a/MailCore/Utils/MailTextStyle.swift +++ b/MailCore/Utils/MailTextStyle.swift @@ -64,10 +64,9 @@ public struct MailTextStyle { font: .system(size: 18, weight: .semibold), color: MailResourcesAsset.primaryTextColor ) - - - public static let header5 = MailTextStyle( - font: .system(size: 15.5, weight: .medium), + + public static let bodyMedium = MailTextStyle( + font: .system(size: 16, weight: .medium), color: MailResourcesAsset.primaryTextColor ) From 6b51c767a6c0a5ef8f0547aecedbbf171226dce0 Mon Sep 17 00:00:00 2001 From: Elena Willen Date: Wed, 4 Jan 2023 14:57:33 +0100 Subject: [PATCH 06/12] refactor(MailTextStyle): bodyMedium not primary --- Mail/Components/BottomSheetButton.swift | 2 +- Mail/Components/FloatingActionButton.swift | 2 +- Mail/Components/LargeButton.swift | 2 +- .../Bottom sheets/BottomSheetButtonsView.swift | 2 +- Mail/Views/Menu Drawer/Folders/FolderCell.swift | 2 +- .../MailboxesManagementView.swift | 2 +- Mail/Views/New Message/ComposeMessageView.swift | 2 +- Mail/Views/NoMailboxView.swift | 2 +- Mail/Views/Onboarding/OnboardingView.swift | 2 +- Mail/Views/Switch User/AccountListMailView.swift | 2 +- Mail/Views/Switch User/AccountView.swift | 4 ++-- Mail/Views/TextStylePreview.swift | 8 ++++---- Mail/Views/Thread/MessageHeaderSummaryView.swift | 2 +- MailCore/Utils/MailTextStyle.swift | 14 +++++++------- .../backgroundCardColor.colorset/Contents.json | 6 +++--- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Mail/Components/BottomSheetButton.swift b/Mail/Components/BottomSheetButton.swift index f1cfafdc1..5b113bbe4 100644 --- a/Mail/Components/BottomSheetButton.swift +++ b/Mail/Components/BottomSheetButton.swift @@ -27,7 +27,7 @@ struct BottomSheetButton: View { var body: some View { Button(action: action) { Text(label) - .textStyle(.header5OnAccent) + .textStyle(.bodyMediumOnAccent) .padding(.horizontal, 12) // Button has already a 12pt horizontal padding .padding(.vertical, 11) // Button has already a 7pt vertical padding } diff --git a/Mail/Components/FloatingActionButton.swift b/Mail/Components/FloatingActionButton.swift index cf4e23383..ce8a27b40 100644 --- a/Mail/Components/FloatingActionButton.swift +++ b/Mail/Components/FloatingActionButton.swift @@ -29,7 +29,7 @@ struct FloatingActionButton: View { Button(action: action) { Label { Text(title) - .textStyle(.header5OnAccent) + .textStyle(.bodyMediumOnAccent) } icon: { icon .resizable() diff --git a/Mail/Components/LargeButton.swift b/Mail/Components/LargeButton.swift index 53a7faa5c..80692b607 100644 --- a/Mail/Components/LargeButton.swift +++ b/Mail/Components/LargeButton.swift @@ -36,7 +36,7 @@ struct LargeButton