I want to know, is there a way to set the backgrou...
# compose-desktop
l
I want to know, is there a way to set the background color of the system decoration without setting undecorated to true?
Copy code
fun main() = application {
    Window(
        onCloseRequest = ::exitApplication, title = "Test", icon = painterResource(Res.drawable.icon)
    ) {
        App()
    }
}
馃憖 1
a
You can set light/dark/system theme on macOS. Beyond that, I don鈥檛 think you can.
l
I set the appearance to dark in macOS settings, but the system decoration did not change the color
a
Pass
-Dapple.awt.application.appearance=system
to the JVM, or set it as a System property.
l
Copy code
compose.desktop {
    application {
        jvmArgs += listOf("-Dapple.awt.application.appearance=system")
    }
}
Is this the setting? I didn't get the corresponding effect.
a
Are you running the app via the gradle run task?
l
I ran the main function directly, and it worked after I tried using the run task. Thank you. I would like to ask if it is also applicable to Windows?
a
It鈥檚 not
l
OK, I understand
@LazyIonEs It's possible thanks to my library under Windows too