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

Space between controls - AKA spacers #506

Open
LoganDark opened this issue Aug 24, 2020 · 1 comment
Open

Space between controls - AKA spacers #506

LoganDark opened this issue Aug 24, 2020 · 1 comment

Comments

@LoganDark
Copy link

libui-rs currently uses empty uiBoxes as stretchy spacers, but what if I want fixed spacers? Not by any particular amount, of course, I just want a unit of space to separate things out by. Like the window margin - no nonstandard px amounts, just one standard unit of space.

Right now, an empty label works okay as a vertical spacer.

image

But what about a horizontal one? A label with a couple space characters as its content? Honestly, both of these solutions feel dirty to me. I think libui should implement proper spacers.

There could be a zero-size spacer, meant for stretchy use, and a one-size spacer meant for non-stretchy use. Maybe there could be two variants of the one-size spacer - one vertical one with zero width, and one horizontal one with zero height.

@LoganDark
Copy link
Author

Also note that this isn't exactly the same as the padding that uiBox already provides, since that indiscriminately provides padding between all elements.

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

1 participant