Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update chevron with new icons #966

Merged
merged 4 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Mail/Components/ChevronIcon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ struct ChevronIcon: View {
}

let style: Style
var color = MailResourcesAsset.textSecondaryColor

var body: some View {
MailResourcesAsset.arrowUp.swiftUIImage
MailResourcesAsset.chevronUp.swiftUIImage
.resizable()
.frame(width: 12, height: 12)
.foregroundColor(MailResourcesAsset.textSecondaryColor)
.padding(.vertical, 2)
.padding(.horizontal, 1.5)
.foregroundColor(color)
.rotationEffect(style.rotationAngle)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ struct MailboxesManagementButtonView: View {
} else {
switch style {
case .blockedPassword:
MailResourcesAsset.arrowRight.swiftUIImage
.resizable()
.frame(width: 12, height: 12)
.foregroundColor(MailResourcesAsset.textPrimaryColor.swiftUIColor)
ChevronIcon(style: .right, color: MailResourcesAsset.textPrimaryColor)
case .menuDrawer:
if let detailNumber {
Text(detailNumber < 100 ? "\(detailNumber)" : "99+")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct AttachmentUploadCell: View {
attachmentRemoved(attachment)
}
} label: {
MailResourcesAsset.closeSmall.swiftUIImage
MailResourcesAsset.close.swiftUIImage
.resizable()
.foregroundColor(MailResourcesAsset.textSecondaryColor)
.frame(width: 12, height: 12)
Expand Down
2 changes: 1 addition & 1 deletion Mail/Views/New Message/ComposeMessageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ struct ComposeMessageView: View {
matomo.track(eventWithCategory: .externals, name: "bannerManuallyClosed")
isShowingExternalTag = false
} label: {
MailResourcesAsset.closeSmall.swiftUIImage
MailResourcesAsset.close.swiftUIImage
.resizable()
.foregroundColor(MailResourcesAsset.onTagColor)
.frame(width: 16, height: 16)
Expand Down
4 changes: 1 addition & 3 deletions Mail/Views/Search/SearchFilterFolderCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ struct SearchFilterFolderCell: View {
}
Text(selectedFolderName)
.font(MailTextStyle.bodyMedium.font)
MailResourcesAsset.arrowDown.swiftUIImage
.resizable()
.frame(width: 12, height: 12)
ChevronIcon(style: .down)
}
}
.filterCellStyle(isSelected: isSelected)
Expand Down
2 changes: 1 addition & 1 deletion Mail/Views/Search/SearchHistorySectionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct SearchHistorySectionView: View {
Button {
deleteSearchTapped(searchItem: searchItem)
} label: {
MailResourcesAsset.closeSmall.swiftUIImage
MailResourcesAsset.close.swiftUIImage
.resizable()
.foregroundColor(MailResourcesAsset.textSecondaryColor.swiftUIColor)
.frame(width: 16, height: 16)
Expand Down
3 changes: 2 additions & 1 deletion Mail/Views/Search/SearchView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ struct SearchView: View {
Constants.globallyResignFirstResponder()
splitViewManager.showSearch = false
} label: {
Image(isCompactWindow ? MailResourcesAsset.arrowLeft.name : MailResourcesAsset.closeBig.name)
Image(systemName: isCompactWindow ? "chevron.left" : "xmark")
.font(.body.weight(isCompactWindow ? .semibold : .regular))
}
.accessibilityLabel(MailResourcesStrings.Localizable.contentDescriptionButtonBack)
}
Expand Down
2 changes: 1 addition & 1 deletion Mail/Views/Thread List/ThreadListHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct UnreadToggleStyle: ToggleStyle {
HStack(spacing: 8) {
configuration.label
if configuration.isOn {
MailResourcesAsset.closeSmall.swiftUIImage
MailResourcesAsset.close.swiftUIImage
.resizable()
.frame(width: 12, height: 12)
}
Expand Down
16 changes: 0 additions & 16 deletions MailResources/Assets.xcassets/arrow-down.imageset/Contents.json

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions MailResources/Assets.xcassets/arrow-left.imageset/Contents.json

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions MailResources/Assets.xcassets/arrow-right.imageset/Contents.json

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 10 additions & 0 deletions MailResources/Assets.xcassets/chevron-up.imageset/chevron-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 0 additions & 16 deletions MailResources/Assets.xcassets/close_big.imageset/Contents.json

This file was deleted.

This file was deleted.

Loading