Tweak spacing in donation hero views

This commit is contained in:
Evan Hahn 2022-11-10 10:48:48 -06:00 committed by GitHub
parent 7eaa87e123
commit b1babe6511
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -483,7 +483,7 @@ class DonateViewController: OWSViewController, OWSNavigationChildController {
let result = UIStackView()
result.axis = .vertical
result.alignment = .fill
result.spacing = 26
result.spacing = 24
return result
}()

View File

@ -22,10 +22,9 @@ class DonationHeroView: UIStackView {
self.axis = .vertical
self.alignment = .center
self.isLayoutMarginsRelativeArrangement = true
self.spacing = 20
self.addArrangedSubview(avatarView)
self.setCustomSpacing(16, after: avatarView)
self.setCustomSpacing(12, after: avatarView)
let titleLabel = UILabel()
titleLabel.textAlignment = .center
@ -37,11 +36,15 @@ class DonationHeroView: UIStackView {
titleLabel.numberOfLines = 0
titleLabel.lineBreakMode = .byWordWrapping
self.addArrangedSubview(titleLabel)
self.setCustomSpacing(20, after: titleLabel)
self.setCustomSpacing(6, after: titleLabel)
descriptionTextView.delegate = self
self.addArrangedSubview(descriptionTextView)
// Others may add additional views after the description view, which is
// why we set this spacing.
self.setCustomSpacing(24, after: descriptionTextView)
rerender()
}