no longer use system property sun.java2d.uiScale (Java 8 only)

This commit is contained in:
Karl Tauber
2020-03-27 10:44:43 +01:00
parent 225b722b1b
commit 12af2de99e
2 changed files with 3 additions and 5 deletions

View File

@@ -5,6 +5,7 @@ FlatLaf Change Log
- Linux: Fixed scaling if `GDK_SCALE` environment variable is set or if running
on JetBrains Runtime. (issue #69)
- No longer use system property `sun.java2d.uiScale`. (Java 8 only)
## 0.28

View File

@@ -177,17 +177,14 @@ public class UIScale
}
/**
* Applies a custom scale factor given in system properties "flatlaf.uiScale"
* or "sun.java2d.uiScale" to the given font.
* Applies a custom scale factor given in system property "flatlaf.uiScale"
* to the given font.
*/
public static FontUIResource applyCustomScaleFactor( FontUIResource font ) {
if( UIScale.isSystemScalingEnabled() )
return font;
String uiScale = System.getProperty( "flatlaf.uiScale" );
if( uiScale == null )
uiScale = System.getProperty( "sun.java2d.uiScale" );
float scaleFactor = parseScaleFactor( uiScale );
if( scaleFactor <= 0 )
return font;