Commit 9bf0d33d authored by Roman Sedaikin's avatar Roman Sedaikin

Added useScreenMenuBar argument for Setup.init

parent 8ff83215
......@@ -3,7 +3,11 @@ package org.jetbrains.skiko
import javax.swing.UIManager
object Setup {
fun init(globalLAF: Boolean = false, noEraseBackground: Boolean = true) {
fun init(
noEraseBackground: Boolean = true,
globalLAF: Boolean = false,
useScreenMenuBar: Boolean = true
) {
if (noEraseBackground) {
// we have to set this property to avoid render flickering.
System.setProperty("sun.awt.noerasebackground", "true")
......@@ -13,11 +17,11 @@ object Setup {
// Setup menu look and feel.
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName())
}
if (useScreenMenuBar) {
System.setProperty("apple.laf.useScreenMenuBar", "true")
}
} catch (e: UnsupportedOperationException) {
// Not all platforms allow this.
}
if (hostOs == OS.MacOS) {
System.setProperty("apple.laf.useScreenMenuBar", "true")
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment