Dirk Hoffmann
05/25/2021, 5:08 PMLocalAppWindow.current.height
is the Dp height of the window (as Int) INCLUDING the OS window title, right?
Is there a target OS independent way to decide the height of the window title? (or is it always 28.dp ?)
I wanna determin the max "usable" height of the window, which seems to be LocalAppWindow height MINUS OS window title ...Igor Demin
05/25/2021, 5:26 PMI wanna determin the max "usable" height of the windowProbably there three ways to retrieve that:
val window = LocalAppWindow.current.window
// insets will be available only after we show the window (or call appWindow.window.pack())
window.height - <http://window.insets.top|window.insets.top> - window.insets.bottom
// or
window.contentPane.height
// or
Box(Modifier.fillMaxSize().onSizeChanged { }) {
App()
}
Depends on how it will be usedBrian G
05/25/2021, 8:53 PMBoxWithConstraints
to get the usable height within Composable. E.g.
Window(...) {
BoxWithConstraints(modifier = Modifier.fillMaxSize()) {
println("${constraints.maxWidth}x${constraints.maxHeight}")
}
}