Open Xiaolangs opened 8 months ago
menubar Can I hide it
I have found a solution and hope it can help you.
This is my old code
fun main = aoplication {
DialogWindow() {
// ...
}
}
And add a Property apple.awt.UIElement
fun main() {
System.setProperty("apple.awt.UIElement", "true");
aoplication {
DialogWindow() {
// ...
}
}
}
This will treat the application as a UI element and no longer display menubar.
But I only tested DialogWindow
without testing Window
. You can try it based on your application, hoping it can help you
This issue have a very interesting behavior what maybe usefull in current issue: https://github.com/JetBrains/compose-multiplatform/issues/4114
Another solution is to add the configuration to InfoPlist during the construction of macos
macOS {
iconFile.set(project.file("icon/mac.icns"))
infoPlist {
extraKeysRawXml = """
<key>LSUIElement</key>
<string>true</string>
<key>LSBackgroundOnly</key>
<string>true</string>
""".trimIndent()
}
}
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.