TextureSwiftSupport icon indicating copy to clipboard operation
TextureSwiftSupport copied to clipboard

ASTextNode text is overflowed in HStackLayout Whereas left padding ois

Open abbasnaqvi200 opened this issue 1 year ago • 1 comments

Why ASTextNode is overflowing instead of truncating…

HStackLayout(alignItems: .center) { img1.preferredSize(.init(width: 20, height: 20)).padding(.left, 9) img2.preferredSize(.init(width: 20, height: 20)) textNode.padding(.left, 6) } IMG_275CCDD3349C-1

abbasnaqvi200 avatar Aug 25 '23 06:08 abbasnaqvi200

Try adding a .flexShrink(1) to the text node. The stack needs to know that this node can be compressed horizontally

JohnEstropia avatar Aug 25 '23 07:08 JohnEstropia