Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
skiko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuqiang
skiko
Commits
9bf0d33d
Commit
9bf0d33d
authored
Jan 20, 2021
by
Roman Sedaikin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added useScreenMenuBar argument for Setup.init
parent
8ff83215
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
Setup.kt
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/Setup.kt
+8
-4
No files found.
skiko/src/jvmMain/kotlin/org/jetbrains/skiko/Setup.kt
View file @
9bf0d33d
...
@@ -3,7 +3,11 @@ package org.jetbrains.skiko
...
@@ -3,7 +3,11 @@ package org.jetbrains.skiko
import
javax.swing.UIManager
import
javax.swing.UIManager
object
Setup
{
object
Setup
{
fun
init
(
globalLAF
:
Boolean
=
false
,
noEraseBackground
:
Boolean
=
true
)
{
fun
init
(
noEraseBackground
:
Boolean
=
true
,
globalLAF
:
Boolean
=
false
,
useScreenMenuBar
:
Boolean
=
true
)
{
if
(
noEraseBackground
)
{
if
(
noEraseBackground
)
{
// we have to set this property to avoid render flickering.
// we have to set this property to avoid render flickering.
System
.
setProperty
(
"sun.awt.noerasebackground"
,
"true"
)
System
.
setProperty
(
"sun.awt.noerasebackground"
,
"true"
)
...
@@ -13,11 +17,11 @@ object Setup {
...
@@ -13,11 +17,11 @@ object Setup {
// Setup menu look and feel.
// Setup menu look and feel.
UIManager
.
setLookAndFeel
(
UIManager
.
getSystemLookAndFeelClassName
())
UIManager
.
setLookAndFeel
(
UIManager
.
getSystemLookAndFeelClassName
())
}
}
if
(
useScreenMenuBar
)
{
System
.
setProperty
(
"apple.laf.useScreenMenuBar"
,
"true"
)
}
}
catch
(
e
:
UnsupportedOperationException
)
{
}
catch
(
e
:
UnsupportedOperationException
)
{
// Not all platforms allow this.
// Not all platforms allow this.
}
}
if
(
hostOs
==
OS
.
MacOS
)
{
System
.
setProperty
(
"apple.laf.useScreenMenuBar"
,
"true"
)
}
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment