compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

Problem in Window with size=DpSize.Unspecified on undecorated windows

Open amir1376 opened this issue 2 years ago • 3 comments

as I saw in WindowState::size if height or width is set to Dp.Unspecified window should size itself equal to its content (width or height or both) but this is just work on decorated

val state = rememberWindowState(
     size = DpSize.Unspecified,
)
Window(
    state = state,
    undecorated = true,
    onCloseRequest = onCloseRequest
) {
    Text("text")
}

in that above code .window ,instead of size itself as its content size it will size itself as entire screen size!

is this a bug? if it is not. what should we do to handle this?

amir1376 avatar Apr 10 '22 06:04 amir1376

+1

Did you manage to solve this? I'm also trying to make window behave like wrap content, but i'm having trouble doing so

lucasmeneghin avatar May 11 '22 14:05 lucasmeneghin

unfortunately no! still have this problem

amir1376 avatar Jun 15 '22 18:06 amir1376

Related?: https://github.com/JetBrains/compose-jb/issues/986

mahozad avatar Sep 15 '22 18:09 mahozad

This appears to be a duplicate of https://github.com/JetBrains/compose-jb/issues/2676

m-sasha avatar Feb 20 '23 15:02 m-sasha