From 8bec475fbadfb93e7df07befb25c0c49f266f27c Mon Sep 17 00:00:00 2001 From: shota Date: Sat, 25 Jun 2022 18:01:19 +0200 Subject: [PATCH] Fix MacOS gap --- build.gradle.kts | 2 +- src/main/kotlin/dev/shota/decompiler/window/Window.kt | 2 +- .../kotlin/dev/shota/decompiler/window/container/Container.kt | 2 +- src/main/kotlin/dev/shota/decompiler/window/sidebar/Sidebar.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 52cf1d8..0b36aba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } group = "dev.shota" -version = "0.6.3" +version = "0.6.4" repositories { mavenCentral() diff --git a/src/main/kotlin/dev/shota/decompiler/window/Window.kt b/src/main/kotlin/dev/shota/decompiler/window/Window.kt index 1368a4c..1d119d7 100644 --- a/src/main/kotlin/dev/shota/decompiler/window/Window.kt +++ b/src/main/kotlin/dev/shota/decompiler/window/Window.kt @@ -41,7 +41,7 @@ object Window : JFrame() { iconImage = icon jMenuBar = MenuBar() - if (SystemInfo.isMacFullWindowContentSupported) { + if (SystemInfo.isMacOS && SystemInfo.isMacFullWindowContentSupported) { getRootPane().putClientProperty("apple.awt.fullWindowContent", true) getRootPane().putClientProperty("apple.awt.transparentTitleBar", true) getRootPane().putClientProperty("apple.awt.windowTitleVisible", false) diff --git a/src/main/kotlin/dev/shota/decompiler/window/container/Container.kt b/src/main/kotlin/dev/shota/decompiler/window/container/Container.kt index fba2936..3e7db85 100644 --- a/src/main/kotlin/dev/shota/decompiler/window/container/Container.kt +++ b/src/main/kotlin/dev/shota/decompiler/window/container/Container.kt @@ -9,7 +9,7 @@ object Container : TabPane() { init { minWidth = 300.0 tabClosingPolicy = TabClosingPolicy.ALL_TABS - tabDragPolicy = if (SystemInfo.isMacFullWindowContentSupported) TabDragPolicy.FIXED else TabDragPolicy.REORDER + tabDragPolicy = if (SystemInfo.isMacOS && SystemInfo.isMacFullWindowContentSupported) TabDragPolicy.FIXED else TabDragPolicy.REORDER } fun open(entry: Entry) { diff --git a/src/main/kotlin/dev/shota/decompiler/window/sidebar/Sidebar.kt b/src/main/kotlin/dev/shota/decompiler/window/sidebar/Sidebar.kt index 8222b3a..c44cb4a 100644 --- a/src/main/kotlin/dev/shota/decompiler/window/sidebar/Sidebar.kt +++ b/src/main/kotlin/dev/shota/decompiler/window/sidebar/Sidebar.kt @@ -18,7 +18,7 @@ object Sidebar : BorderPane() { init { minWidth = 100.0 - if (SystemInfo.isMacFullWindowContentSupported) { + if (SystemInfo.isMacOS && SystemInfo.isMacFullWindowContentSupported) { val space = Pane() space.prefHeight = 25.0 top = space