Skip to content

Commit

Permalink
Merge pull request #966 from Infomaniak/update-chevron
Browse files Browse the repository at this point in the history
feat: Update chevron with new icons
  • Loading branch information
Lnamw committed Sep 5, 2023
2 parents bdf4eda + 1d7866e commit 68e79a3
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 95 deletions.
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.

0 comments on commit 68e79a3

Please sign in to comment.