File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Sources/OpenSwiftUICore/View/Graph Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -634,20 +634,18 @@ package struct RootGeometry: Rule, AsyncAttribute {
634
634
origin += ( proposal- fittingSize) * 0.5
635
635
}
636
636
637
- // For RTL layout, adjust the x position to maintain proper visual alignment
638
- if let layoutDirection, layoutDirection == . rightToLeft {
639
- // This flips the x-coordinate to maintain proper visual layout in RTL mode
640
- origin. x = proposedSize. width - CGRect( origin: origin, size: fittingSize) . maxX
641
- }
642
-
643
- return ViewGeometry (
637
+ var geometry = ViewGeometry (
644
638
origin: ViewOrigin ( origin) ,
645
639
dimensions: ViewDimensions (
646
640
guideComputer: layoutComputer,
647
641
size: fittingSize,
648
642
proposal: . init( proposal)
649
643
)
650
644
)
645
+ if let layoutDirection {
646
+ geometry. finalizeLayoutDirection ( layoutDirection, parentSize: proposedSize. value)
647
+ }
648
+ return geometry
651
649
}
652
650
}
653
651
You can’t perform that action at this time.
0 commit comments