Skip to content

Commit

Permalink
refactor(ChevronIcon): Do not add padding
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinperignon committed Sep 5, 2023
1 parent 4c43849 commit 130f646
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 36 deletions.
5 changes: 2 additions & 3 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.arrowDown.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
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
16 changes: 0 additions & 16 deletions MailResources/Assets.xcassets/arrow-right.imageset/Contents.json

This file was deleted.

This file was deleted.

0 comments on commit 130f646

Please sign in to comment.