Skip to content

Commit

Permalink
Add top and bottom padding of 4 pts to renderer button
Browse files Browse the repository at this point in the history
  • Loading branch information
levieggertcru committed Jan 21, 2025
1 parent a7695df commit 5089ba0
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ import UIKit

class MobileContentButtonView: MobileContentView {

private static let topPadding: CGFloat = 4
private static let bottomPadding: CGFloat = 4

private let viewModel: MobileContentButtonViewModel
private let buttonView: UIView = UIView()
private let buttonTitle: UILabel = UILabel()
private let buttonImagePaddingToButtonTitle: CGFloat = 12
private let minimumButtonHeight: CGFloat = 21
private let buttonTopAndBottomPaddingToTitle: CGFloat = 8
private let contentInsets: UIEdgeInsets

private var buttonTitleSizeToFitSize: CGSize?
private var buttonImageView: UIImageView?
Expand All @@ -26,6 +30,7 @@ class MobileContentButtonView: MobileContentView {
init(viewModel: MobileContentButtonViewModel) {

self.viewModel = viewModel
self.contentInsets = UIEdgeInsets(top: Self.topPadding, left: 0, bottom: Self.bottomPadding, right: 0)

super.init(viewModel: viewModel, frame: UIScreen.main.bounds)

Expand Down Expand Up @@ -88,8 +93,8 @@ class MobileContentButtonView: MobileContentView {
// buttonView
addSubview(buttonView)
buttonView.translatesAutoresizingMaskIntoConstraints = false
_ = buttonView.constrainTopToView(view: self)
_ = buttonView.constrainBottomToView(view: self)
_ = buttonView.constrainTopToView(view: self, constant: contentInsets.top)
_ = buttonView.constrainBottomToView(view: self, constant: contentInsets.bottom)

_ = buttonView.addHeightConstraint(
constant: minimumButtonHeight,
Expand Down

0 comments on commit 5089ba0

Please sign in to comment.