JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.17k stars 1.11k forks source link

The Windows should follow the system theme #4393

Closed StefanOltmann closed 1 month ago

StefanOltmann commented 3 months ago

The androidx.compose.ui.window.Window should follow the system theme or provide a boolean to enable the dark mode.

Right now it's always in light mode. At least for macOS.

grafik
m-sasha commented 3 months ago

You can control this by setting the "apple.awt.application.appearance" system property to "system", e.g. by passing -Dapple.awt.application.appearance=system to Java.

alexzhirkevich commented 3 months ago

You can take a look at https://github.com/jetBrains/jewel. I use it for title bar styling. Pretty flexible tool that allows you to fully customize title bar while maintaining native-looking window decorations

m-sasha commented 3 months ago

@StefanOltmann Can we close this?

StefanOltmann commented 3 months ago

@m-sasha The option works. I would suggest to add this per default.

If you don't think this should be a default, we can close the issue.

m-sasha commented 3 months ago

I don't think this is such a big deal that breaking existing apps is worth it.

igordmn commented 1 month ago

The same issue encountered by an internal user.

If not changing default, we should provide docs/API (apple.awt.application.appearance is an AWT constant, which is implementation details) and change templates. Though, changing the default is also an option, we can't avoid behaviour changes between versions.

igordmn commented 1 month ago

Actually, we have an older issue. Let's keep only it: https://github.com/JetBrains/compose-multiplatform/issues/3928

StefanOltmann commented 1 month ago

Sorry, @igordmn, I did not find the other issue back then.