diff --git a/CHANGELOG.md b/CHANGELOG.md index be93e860..3e56957a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,11 @@ FlatLaf Change Log - Clear button no longer paints over round border. (issue #451) - Extras: Fixed concurrent loading of SVG icons on multiple threads. (issue #459) - +- Use FlatLaf native window decorations by default when running in + [JetBrains Runtime](https://github.com/JetBrains/JetBrainsRuntime/wiki) + (instead of using JetBrains custom decorations). System variable + `flatlaf.useJetBrainsCustomDecorations` is now `false` by default (was `true` + in FlatLaf 1.x). (issue #454) ## 2.0-rc1 diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java index 08ca5dc3..510ff75d 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/FlatSystemProperties.java @@ -81,7 +81,7 @@ public interface FlatSystemProperties * {@link FlatClientProperties#USE_WINDOW_DECORATIONS} and * UI default {@code TitlePane.useWindowDecorations}. *
- * (requires Window 10) + * (requires Window 10/11) *
* Allowed Values {@code false} and {@code true}
* Default none
@@ -92,16 +92,16 @@ public interface FlatSystemProperties
* Specifies whether JetBrains Runtime custom window decorations should be used
* when creating {@code JFrame} or {@code JDialog}.
* Requires that the application runs in a
- * JetBrains Runtime
+ * JetBrains Runtime
* (based on OpenJDK).
*
* Setting this to {@code false} disables using JetBrains Runtime custom window decorations. * Then FlatLaf native window decorations are used. *
- * (requires Window 10) + * (requires Window 10/11) *
* Allowed Values {@code false} and {@code true}
- * Default {@code true}
+ * Default {@code false} (since v2; was {@code true} in v1)
*/
String USE_JETBRAINS_CUSTOM_DECORATIONS = "flatlaf.useJetBrainsCustomDecorations";
@@ -116,7 +116,7 @@ public interface FlatSystemProperties
* {@link FlatClientProperties#MENU_BAR_EMBEDDED} and
* UI default {@code TitlePane.menuBarEmbedded}.
*
- * (requires Window 10) + * (requires Window 10/11) *
* Allowed Values {@code false} and {@code true}
* Default none
diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowBorder.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowBorder.java
index 47adcc2b..77bf81ab 100644
--- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowBorder.java
+++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowBorder.java
@@ -56,7 +56,7 @@ public class FlatNativeWindowBorder
private static final boolean canUseJBRCustomDecorations =
canUseWindowDecorations &&
SystemInfo.isJetBrainsJVM_11_orLater &&
- FlatSystemProperties.getBoolean( FlatSystemProperties.USE_JETBRAINS_CUSTOM_DECORATIONS, true );
+ FlatSystemProperties.getBoolean( FlatSystemProperties.USE_JETBRAINS_CUSTOM_DECORATIONS, false );
private static Boolean supported;
private static Provider nativeProvider;