rxi / microui

A tiny immediate-mode UI library
MIT License
3.47k stars 241 forks source link

Can you layout from minimum required sizes by child widgets? #63

Open cesss opened 1 year ago

cesss commented 1 year ago

I don't quite understand the meaning of zero and negative values for the widths and height in a row (yes, I read the Usage doc, but even with that I don't understand what these values actually do).

What I need is to never hardcode any size at all, and just pack the widgets respecting the minimum size they need to be drawn without clipping the text. Sure, some widgets do need a size (a slider for example), but in those cases I'd be fine if such a widget takes all the space which is not requested by the rest of widgets in the row.

Can this be done with the current layout system, or would I need to modify it?

Also, do widgets say what's the minimum size they need? Or maybe that's not implemented?

Thanks!