All Downloads are FREE. Search and download functionalities are using the official Maven repository.

desktopMain.ru.alexgladkov.odyssey.compose.helpers.WindowSize.kt Maven / Gradle / Ivy

There is a newer version: 1.4.0-alpha05
Show newest version
package ru.alexgladkov.odyssey.compose.helpers

import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.window.rememberWindowState
import kotlin.math.roundToInt

@Composable
actual fun extractWindowHeight(): Int {
    val density = LocalDensity.current
    val state = rememberWindowState()
    return with(density) { state.size.height.toPx().roundToInt() }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy