Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JetBrains Compose for Desktop title bar background color or dark mode

Is there a way in JetBrains Compose for Desktop to change the title bar background color or just change it for dark mode? I'm using MacOS, so the bar can be light or dark. It would also be fine to make titlebar itself invisible (but keep the close, minimise and maximise buttons) and create your own view below it.

I was looking in the compose window code, but couldn't find it there.

like image 658
Kevin van Mierlo Avatar asked Oct 20 '25 10:10

Kevin van Mierlo


1 Answers

Compose is build on top of Swing, and it doesn't seems possible to change the title bar color.

But at least you can follow system dark/light mode with the following option in your build.gradle.kts:

compose.desktop {
    application {
        // ...
        nativeDistributions {
            // ...
            jvmArgs(
                "-Dapple.awt.application.appearance=system"
            )
        }
    }
}

An other option is building your own title bar, like shown in this tutorial, but this will also hide the system buttons, which is far from perfect.

like image 51
Philip Dukhov Avatar answered Oct 22 '25 03:10

Philip Dukhov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!