mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
Native window decorations: do not use window decorations if system property sun.java2d.opengl is true on Windows 10 (issue #540)
This commit is contained in:
@@ -12,6 +12,8 @@ FlatLaf Change Log
|
|||||||
- `HiDPIUtils.paintAtScale1x()` now supports rotated graphics. (issue #557)
|
- `HiDPIUtils.paintAtScale1x()` now supports rotated graphics. (issue #557)
|
||||||
- Typography: No longer use `Consolas` or `Courier New` as monospaced font on
|
- Typography: No longer use `Consolas` or `Courier New` as monospaced font on
|
||||||
Windows because they have bad vertically placement.
|
Windows because they have bad vertically placement.
|
||||||
|
- Native window decorations (Windows 10/11 only): Do not use window decorations
|
||||||
|
if system property `sun.java2d.opengl` is `true` on Windows 10. (issue #540)
|
||||||
|
|
||||||
|
|
||||||
## 2.3
|
## 2.3
|
||||||
|
|||||||
@@ -42,11 +42,13 @@ import com.formdev.flatlaf.util.SystemInfo;
|
|||||||
public class FlatNativeWindowBorder
|
public class FlatNativeWindowBorder
|
||||||
{
|
{
|
||||||
// can use window decorations if:
|
// can use window decorations if:
|
||||||
// - on Windows 10
|
// - on Windows 10 or later
|
||||||
|
// - not if system property "sun.java2d.opengl" is true on Windows 10
|
||||||
// - not when running in JetBrains Projector, Webswing or WinPE
|
// - not when running in JetBrains Projector, Webswing or WinPE
|
||||||
// - not disabled via system property
|
// - not disabled via system property
|
||||||
private static final boolean canUseWindowDecorations =
|
private static final boolean canUseWindowDecorations =
|
||||||
SystemInfo.isWindows_10_orLater &&
|
SystemInfo.isWindows_10_orLater &&
|
||||||
|
(SystemInfo.isWindows_11_orLater || !FlatSystemProperties.getBoolean( "sun.java2d.opengl", false )) &&
|
||||||
!SystemInfo.isProjector &&
|
!SystemInfo.isProjector &&
|
||||||
!SystemInfo.isWebswing &&
|
!SystemInfo.isWebswing &&
|
||||||
!SystemInfo.isWinPE &&
|
!SystemInfo.isWinPE &&
|
||||||
|
|||||||
Reference in New Issue
Block a user