ref: dark title bar

This commit is contained in:
tapframe 2026-06-09 00:24:27 +05:30
parent 2f9d7fe157
commit 9381693482
2 changed files with 9 additions and 0 deletions

View file

@ -442,6 +442,7 @@ compose.desktop {
val smokePlayerUrl = providers.gradleProperty("nuvio.desktop.smokePlayerUrl").orNull
?: System.getenv("NUVIO_DESKTOP_SMOKE_PLAYER_URL")
jvmArgs += listOfNotNull(
"-Dapple.awt.application.appearance=NSAppearanceNameDarkAqua",
"--add-opens=java.desktop/java.awt=ALL-UNNAMED",
"--add-opens=java.desktop/sun.lwawt=ALL-UNNAMED",
"--add-opens=java.desktop/sun.lwawt.macosx=ALL-UNNAMED",

View file

@ -19,8 +19,10 @@ import javax.swing.JComponent
private val NuvioDesktopNativeBackground = AwtColor(0x0D, 0x0D, 0x0D)
private const val NuvioDesktopIconPath = "icons/nuvio-app-icon.png"
private const val MacosDarkAquaAppearance = "NSAppearanceNameDarkAqua"
fun main() {
configureDesktopChrome()
preloadNativePlayerBridgeAsync()
application {
@ -59,3 +61,9 @@ fun main() {
}
}
}
private fun configureDesktopChrome() {
if (System.getProperty("os.name").contains("mac", ignoreCase = true)) {
System.setProperty("apple.awt.application.appearance", MacosDarkAquaAppearance)
}
}