Closed PPakalns closed 1 month ago
in list of buttons largest button is removed, the space could be shrunk.
This should definitely work, what doesn't work is something like flex-shrink, where it checks all the items for their intrinsic size and then shrinks them to fit into the available space.
https://github.com/emilk/egui/issues/4378
I wanted to provide feedback for these great egui layouting approaches.
I have played around with egui taffy, tried some modifications.
One approach that seems to work nicely for layouting group of components is to embed them into
Frame
andScrollArea
. Then fromFrame
borders andScrollAreaOutput
real width, height can be retrieved that can be used to invalidate, recalculate layout for the next frame.This allow for grow and shrink functionality to work. Sadly with some jitter, frame delay. (Will try to solve issue with: https://github.com/emilk/egui/pull/5059)
Will explore egui flex. Would be great if some kind of shrink functionality could be supported if, for example, in list of buttons largest button is removed, the space could be shrunk. Maybe response could provide optional minimal size feedback that could be used (even if custom widgets must be implemented to provide this information).
Thank you for your great work in this area!