mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
no longer use system property sun.java2d.uiScale (Java 8 only)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user