We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 720ae93 commit 8a53df4Copy full SHA for 8a53df4
Sources/SwiftCrossUI/LayoutSystem.swift
@@ -70,7 +70,7 @@ public enum LayoutSystem {
70
let visibleChildrenCount = isHidden.count { hidden in
71
!hidden
72
}
73
- let totalSpacing = (visibleChildrenCount - 1) * spacing
+ let totalSpacing = max(visibleChildrenCount - 1, 0) * spacing
74
let proposedSizeWithoutSpacing = SIMD2(
75
proposedSize.x - (orientation == .horizontal ? totalSpacing : 0),
76
proposedSize.y - (orientation == .vertical ? totalSpacing : 0)
0 commit comments