Skip to content

Commit 14db8e3

Browse files
authored
Fix VGridLayout #76
1 parent 013469d commit 14db8e3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/LayoutSpecBuilders/Layout/VGridLayout.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ public struct VGridLayout<Content> : _ASLayoutElementType where Content : _ASLay
112112
case .fixed(let length):
113113

114114
spec.style.width = ASDimension(unit: .points, value: length)
115+
spec.style.flexShrink = 0
115116

116117
case .flexible(let minimum, let maximum):
117118

@@ -127,13 +128,12 @@ public struct VGridLayout<Content> : _ASLayoutElementType where Content : _ASLay
127128
spec.style.maxWidth = ASDimension(unit: .points, value: minimum)
128129
}
129130

131+
spec.style.width = ASDimension(unit: .fraction, value: 1)
132+
spec.style.flexShrink = 1
130133
}
131134

132135
}
133136

134-
spec.style.width = ASDimension(unit: .fraction, value: 1)
135-
spec.style.flexShrink = 1
136-
137137
return spec
138138
}
139139

0 commit comments

Comments
 (0)