https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
s

Stan van der Bend

11/24/2023, 11:46 AM
Hey, I am trying to dynamically resize my Window based on state changes, for example, I have a "collapse" mode where a large chunk of the UI is hidden and then I want the Window size to fit the contents. I have tried about a billion approaches now, and every time I get close, it sometimes messes up the layout as can be seen in the included screenshot (see how the content is moved to the bottom left, the black screen is my bounds). When I try to resize the window when this happens, it restores the right size. So I am wondering if there is a way to force composed to recalculate all the layouts based on a window size change.
a

Alexander Maryanovsky

11/24/2023, 12:48 PM
It should do it automatically, as it does when the user resizes the window. A small example/reproducer of what you’re doing/trying to do could help us help you.
5 Views