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

Guilherme Delgado

07/28/2022, 2:07 PM
Is there any way to query for screen dimensions? Let’s say I want the
windowState.size.width
to be 1/3 of screen width, how can I achieve this? Didn’t found any samples/docs, but one approach is to use
Dp.Unspecified
for it’s width, and make the children use
width.fillMaxWidth
, create a
LaunchedEffect
and change the value like
windowState.size.width = windowState.size.width/3
. But this feels hacky 😅 and obviously it will be visually noticed. So, do I have another way to do it (hope so 🙏 )?
2 Views