Marcin Wisniowski
05/25/2025, 9:14 PMwhen
), but I want the layout to keep the same size, so I need the outer container to be the size of the largest element. Is there some solution for this I am missing or would I need to measure all 3 with a Layout
and then only place one?Zach Klippenstein (he/him) [MOD]
05/27/2025, 2:48 PMMarcin Wisniowski
05/27/2025, 2:53 PMLayout
and it works correctly, but it recomposes all the elements instead of only the current one, because the layout goes through all of them before selecting one to .place()
. So it's not as efficient. I only need to measure them once and never again.Zach Klippenstein (he/him) [MOD]
05/27/2025, 3:03 PMZach Klippenstein (he/him) [MOD]
05/27/2025, 3:05 PMMarcin Wisniowski
05/27/2025, 3:06 PMWell nothing prevents any of the items from changing size while they’re not placedEven if they changed size, Compose Desktop does not resize windows when the window content changes, so it wouldn't work anyway. This is only important for the initial window content to be correct size, since that's when the window size is determined.
Marcin Wisniowski
05/27/2025, 3:07 PMuse a flag to compose and measure them on the first frame and then remove them on the second frame.Yeah, I could do that 👍