3

I want to change the size of the window of my Kotlin Compose Desktop application so when it launches its 720p instead of the odd square it is by default. How can i do that?

I have tried this and have looked it up to no avail

fun FrameWindowScope.setMinSize() {
    window.minimumSize = Dimension(1280, 720)
}

1 Answer 1

4

You can simply do it like that:

    val state = rememberWindowState(
        width = 300.dp,
        height = 600.dp,
    )
    Window(
        onCloseRequest = ::exitApplication,
        title = "AppName",
        state = state
    ) {
        App()
    }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.