mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-14 15:57:12 -06:00
Native window decorations: support 32-bit JREs
This commit is contained in:
@@ -144,7 +144,7 @@ public abstract class FlatLaf
|
||||
* <p>
|
||||
* Returns also {@code false} on Windows 10 if:
|
||||
* <ul>
|
||||
* <li>FlatLaf native window border support is available (requires Windows 10 64-bit)</li>
|
||||
* <li>FlatLaf native window border support is available (requires Windows 10)</li>
|
||||
* <li>running in
|
||||
* <a href="https://confluence.jetbrains.com/display/JBR/JetBrains+Runtime">JetBrains Runtime 11 (or later)</a>
|
||||
* (<a href="https://github.com/JetBrains/JetBrainsRuntime">source code on github</a>)
|
||||
|
||||
@@ -63,7 +63,7 @@ public interface FlatSystemProperties
|
||||
* <p>
|
||||
* Setting this to {@code false} disables using FlatLaf native window decorations.
|
||||
* <p>
|
||||
* (requires Window 10 64-bit)
|
||||
* (requires Window 10)
|
||||
* <p>
|
||||
* <strong>Allowed Values</strong> {@code false} and {@code true}<br>
|
||||
* <strong>Default</strong> none
|
||||
|
||||
@@ -221,8 +221,8 @@ public class FlatNativeWindowBorder
|
||||
return;
|
||||
supported = false;
|
||||
|
||||
// requires Windows 10 on x86_64
|
||||
if( !SystemInfo.isWindows_10_orLater || !SystemInfo.isX86_64 )
|
||||
// requires Windows 10
|
||||
if( !SystemInfo.isWindows_10_orLater )
|
||||
return;
|
||||
|
||||
// check whether disabled via system property
|
||||
|
||||
@@ -79,8 +79,8 @@ class FlatWindowsNativeWindowBorder
|
||||
private static FlatWindowsNativeWindowBorder instance;
|
||||
|
||||
static FlatNativeWindowBorder.Provider getInstance() {
|
||||
// requires Windows 10 on x86_64
|
||||
if( !SystemInfo.isWindows_10_orLater || !SystemInfo.isX86_64 )
|
||||
// requires Windows 10
|
||||
if( !SystemInfo.isWindows_10_orLater )
|
||||
return null;
|
||||
|
||||
// load native library
|
||||
@@ -98,8 +98,11 @@ class FlatWindowsNativeWindowBorder
|
||||
}
|
||||
}
|
||||
|
||||
nativeLibrary = new NativeLibrary(
|
||||
"com/formdev/flatlaf/natives/flatlaf-windows-x86_64",
|
||||
String libraryName = "com/formdev/flatlaf/natives/flatlaf-windows-x86";
|
||||
if( SystemInfo.isX86_64 )
|
||||
libraryName += "_64";
|
||||
|
||||
nativeLibrary = new NativeLibrary( libraryName,
|
||||
FlatWindowsNativeWindowBorder.class.getClassLoader(), true );
|
||||
}
|
||||
|
||||
@@ -135,8 +138,8 @@ class FlatWindowsNativeWindowBorder
|
||||
}
|
||||
|
||||
private void install( Window window ) {
|
||||
// requires Windows 10 on x86_64
|
||||
if( !SystemInfo.isWindows_10_orLater || !SystemInfo.isX86_64 )
|
||||
// requires Windows 10
|
||||
if( !SystemInfo.isWindows_10_orLater )
|
||||
return;
|
||||
|
||||
// only JFrame and JDialog are supported
|
||||
|
||||
Reference in New Issue
Block a user