Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASTextNode text is overflowed in HStackLayout Whereas left padding ois #110

Open
abbasnaqvi200 opened this issue Aug 25, 2023 · 1 comment

Comments

@abbasnaqvi200
Copy link

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

@JohnEstropia
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants