Skip to content

Commit a38ad86

Browse files
committed
Revert AdaptiveTabBar changes
1 parent edc7b9b commit a38ad86

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Modules/Sources/WordPressUI/Views/AdaptiveTabBar.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public class AdaptiveTabBar: UIControl {
132132
config.title = item.localizedTitle
133133
config.contentInsets = NSDirectionalEdgeInsets(
134134
top: 8,
135-
leading: 6,
135+
leading: index == 0 ? 20 : 6,
136136
bottom: 8,
137137
trailing: 6
138138
)
@@ -178,7 +178,8 @@ public class AdaptiveTabBar: UIControl {
178178
let totalPreferredWidth = maxWidth * CGFloat(buttons.count)
179179

180180
// If the items don't fit, enable scrolling
181-
let shouldFillWidth = totalPreferredWidth <= safeAreaLayoutGuide.layoutFrame.width
181+
// Adding 2 just in case if there is some rounding error somewhere
182+
let shouldFillWidth = (totalPreferredWidth + 2) <= safeAreaLayoutGuide.layoutFrame.width
182183
if shouldFillWidth {
183184
stackView.distribution = .fillEqually
184185
widthConstraint.isActive = true

0 commit comments

Comments
 (0)