Skip to content

Commit 13333b7

Browse files
committed
Fixes to properly space title from tab strip on dark mode.
- Move the spacing from the constraint to the header view stack view marking - Add a 4pt spacing between member of the header stack view.
1 parent 43c667d commit 13333b7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/DashboardViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ final class DashboardViewController: UIViewController {
5252
view.translatesAutoresizingMaskIntoConstraints = false
5353
view.backgroundColor = .listForeground(modal: false)
5454
view.axis = .vertical
55+
view.directionalLayoutMargins = .init(top: 0, leading: 0, bottom: Constants.tabStripSpacing, trailing: 0)
56+
view.spacing = Constants.headerStackViewSpacing
5557
return view
5658
}()
5759

@@ -291,7 +293,7 @@ private extension DashboardViewController {
291293

292294
// This constraint will pin the bottom of the header to the top of the content
293295
// We want this to be active when the header is visible
294-
contentTopToHeaderConstraint = contentView.topAnchor.constraint(equalTo: headerStackView.bottomAnchor, constant: Constants.tabStripSpacing)
296+
contentTopToHeaderConstraint = contentView.topAnchor.constraint(equalTo: headerStackView.bottomAnchor)
295297
contentTopToHeaderConstraint?.isActive = true
296298

297299
// This constraint has a lower priority and will pin the top of the content view to its superview
@@ -720,5 +722,6 @@ private extension DashboardViewController {
720722
static let iPhoneCollapsedNavigationBarHeight = CGFloat(44)
721723
static let iPadCollapsedNavigationBarHeight = CGFloat(50)
722724
static let tabStripSpacing = CGFloat(12)
725+
static let headerStackViewSpacing = CGFloat(4)
723726
}
724727
}

0 commit comments

Comments
 (0)