improve web container size
This commit is contained in:
@@ -21,9 +21,11 @@ fun main() = application {
|
|||||||
File(appDir).mkdirs()
|
File(appDir).mkdirs()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val state = rememberWindowState(width = 800.dp, height = 600.dp)
|
||||||
|
|
||||||
Window(
|
Window(
|
||||||
title = "Overseerr",
|
title = "Overseerr",
|
||||||
state = rememberWindowState(width = 800.dp, height = 600.dp),
|
state = state,
|
||||||
onCloseRequest = ::exitApplication
|
onCloseRequest = ::exitApplication
|
||||||
) {
|
) {
|
||||||
window.minimumSize = Dimension(320, 480)
|
window.minimumSize = Dimension(320, 480)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import androidx.compose.ui.window.ComposeViewport
|
|||||||
import dev.meloda.overseerr.App
|
import dev.meloda.overseerr.App
|
||||||
import dev.meloda.overseerr.di.appModule
|
import dev.meloda.overseerr.di.appModule
|
||||||
import kotlinx.browser.document
|
import kotlinx.browser.document
|
||||||
|
import kotlinx.browser.window
|
||||||
import org.koin.compose.KoinApplication
|
import org.koin.compose.KoinApplication
|
||||||
|
|
||||||
@OptIn(ExperimentalComposeUiApi::class)
|
@OptIn(ExperimentalComposeUiApi::class)
|
||||||
@@ -22,8 +23,8 @@ fun main() {
|
|||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.width(360.dp)
|
.width(window.innerWidth.coerceIn(360..600).dp)
|
||||||
.height(640.dp)
|
.height(window.innerHeight.coerceIn(minimumValue = 360, maximumValue = null).dp)
|
||||||
) {
|
) {
|
||||||
App()
|
App()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user