Skip to content

Commit a672722

Browse files
committed
Enlarge action button tap area
1 parent ca51b4c commit a672722

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

WooCommerce/Classes/Tools/Notices/NoticeView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,7 @@ private extension NoticeView {
141141
contentStackView.addArrangedSubview(actionBackgroundView)
142142
actionBackgroundView.translatesAutoresizingMaskIntoConstraints = false
143143

144-
actionBackgroundView.layoutMargins = Metrics.layoutMargins
145-
actionBackgroundView.backgroundColor = Appearance.actionBackgroundColor
146-
144+
actionBackgroundView.layoutMargins = .zero
147145
actionBackgroundView.addSubview(actionButton)
148146
actionButton.translatesAutoresizingMaskIntoConstraints = false
149147

@@ -158,6 +156,8 @@ private extension NoticeView {
158156
actionButton.setTitleColor(Appearance.actionColor, for: .normal)
159157
actionButton.addTarget(self, action: #selector(actionButtonTapped), for: .touchUpInside)
160158
actionButton.setContentCompressionResistancePriority(.required, for: .horizontal)
159+
actionButton.contentEdgeInsets = Metrics.layoutMargins
160+
actionButton.backgroundColor = Appearance.actionBackgroundColor
161161
}
162162

163163
func configureDismissRecognizer() {

0 commit comments

Comments
 (0)