slim the button width again
This commit is contained in:
parent
ea64469c2b
commit
c08b1617c2
|
@ -70,7 +70,7 @@ final class HomeVC : BaseVC, UITableViewDataSource, UITableViewDelegate, NewConv
|
|||
let createNewPrivateChatButton = Button(style: .prominentOutline, size: .large)
|
||||
createNewPrivateChatButton.setTitle(NSLocalizedString("vc_home_empty_state_button_title", comment: ""), for: UIControl.State.normal)
|
||||
createNewPrivateChatButton.addTarget(self, action: #selector(createNewDM), for: UIControl.Event.touchUpInside)
|
||||
createNewPrivateChatButton.set(.width, to: 196)
|
||||
createNewPrivateChatButton.set(.width, to: Values.iPadButtonWidth)
|
||||
let result = UIStackView(arrangedSubviews: [ explanationLabel, createNewPrivateChatButton ])
|
||||
result.axis = .vertical
|
||||
result.spacing = Values.mediumSpacing
|
||||
|
|
|
@ -159,8 +159,7 @@ class MessageRequestsViewController: BaseVC, UITableViewDelegate, UITableViewDat
|
|||
equalTo: view.safeAreaLayoutGuide.bottomAnchor,
|
||||
constant: -Values.largeSpacing
|
||||
),
|
||||
// Note: The '182' is to match the 'Next' button on the New DM page (which doesn't have a fixed width)
|
||||
clearAllButton.widthAnchor.constraint(equalToConstant: 182),
|
||||
clearAllButton.widthAnchor.constraint(equalToConstant: Values.iPadButtonWidth),
|
||||
clearAllButton.heightAnchor.constraint(equalToConstant: NewConversationButtonSet.collapsedButtonSize)
|
||||
])
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class Modal: BaseVC, UIGestureRecognizerDelegate {
|
|||
private func setUpViewHierarchy() {
|
||||
view.addSubview(contentView)
|
||||
if UIDevice.current.isIPad {
|
||||
contentView.set(.width, to: Values.iPadButtonWidth)
|
||||
contentView.set(.width, to: Values.iPadModalWidth)
|
||||
contentView.center(in: view)
|
||||
} else {
|
||||
contentView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: Values.veryLargeSpacing).isActive = true
|
||||
|
|
|
@ -44,6 +44,7 @@ public final class Values : NSObject {
|
|||
@objc public static let onboardingButtonBottomOffset = isIPhone5OrSmaller ? CGFloat(52) : CGFloat(72)
|
||||
|
||||
// MARK: - iPad Sizes
|
||||
@objc public static let iPadButtonWidth = UIScreen.main.bounds.width / 2
|
||||
@objc public static let iPadModalWidth = UIScreen.main.bounds.width / 2
|
||||
@objc public static let iPadButtonWidth = CGFloat(196)
|
||||
@objc public static let iPadButtonSpacing = CGFloat(32)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue