Skip to content

Commit

Permalink
Tweaks to padding as part of design review
Browse files Browse the repository at this point in the history
  • Loading branch information
amddg44 committed Sep 22, 2023
1 parent 6195755 commit 9f1d8f0
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions DuckDuckGo/AutofillSettingsEnableFooterView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ import UIKit

class AutofillSettingsEnableFooterView: UIView {

private enum Constants {
static let topPadding: CGFloat = 8
static let defaultPadding: CGFloat = 16
}

override init(frame: CGRect) {
super.init(frame: frame)
installSubviews()
Expand Down Expand Up @@ -51,10 +56,10 @@ class AutofillSettingsEnableFooterView: UIView {
title.translatesAutoresizingMaskIntoConstraints = false

NSLayoutConstraint.activate([
title.topAnchor.constraint(equalTo: self.topAnchor, constant: 8),
title.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -16),
title.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: 0),
title.trailingAnchor.constraint(lessThanOrEqualTo: self.trailingAnchor, constant: -8)
title.topAnchor.constraint(equalTo: self.topAnchor, constant: Constants.topPadding),
title.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -Constants.defaultPadding),
title.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: Constants.defaultPadding),
title.trailingAnchor.constraint(lessThanOrEqualTo: self.trailingAnchor, constant: -Constants.defaultPadding)
])
}
}

0 comments on commit 9f1d8f0

Please sign in to comment.