Skip to content

Commit 9ff90d6

Browse files
committed
Fix ZStack widget size (fixes onClick in ZStacks)
1 parent e2bbfdd commit 9ff90d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/SwiftCrossUI/Views/ZStack.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public struct ZStack<Content: View>: View {
55
self.init(content: content())
66
}
77

8-
public init(content: Content) {
8+
init(content: Content) {
99
body = content
1010
}
1111

@@ -59,6 +59,7 @@ public struct ZStack<Content: View>: View {
5959
let position = (size.size &- childSize.size) / 2
6060
backend.setPosition(ofChildAt: i, in: widget, to: position)
6161
}
62+
backend.setSize(of: widget, to: size.size)
6263
}
6364

6465
return ViewUpdateResult(size: size, childResults: childResults)

0 commit comments

Comments
 (0)