mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-15 00:07:12 -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
|
- Linux: Fixed scaling if `GDK_SCALE` environment variable is set or if running
|
||||||
on JetBrains Runtime. (issue #69)
|
on JetBrains Runtime. (issue #69)
|
||||||
|
- No longer use system property `sun.java2d.uiScale`. (Java 8 only)
|
||||||
|
|
||||||
|
|
||||||
## 0.28
|
## 0.28
|
||||||
|
|||||||
@@ -177,17 +177,14 @@ public class UIScale
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Applies a custom scale factor given in system properties "flatlaf.uiScale"
|
* Applies a custom scale factor given in system property "flatlaf.uiScale"
|
||||||
* or "sun.java2d.uiScale" to the given font.
|
* to the given font.
|
||||||
*/
|
*/
|
||||||
public static FontUIResource applyCustomScaleFactor( FontUIResource font ) {
|
public static FontUIResource applyCustomScaleFactor( FontUIResource font ) {
|
||||||
if( UIScale.isSystemScalingEnabled() )
|
if( UIScale.isSystemScalingEnabled() )
|
||||||
return font;
|
return font;
|
||||||
|
|
||||||
String uiScale = System.getProperty( "flatlaf.uiScale" );
|
String uiScale = System.getProperty( "flatlaf.uiScale" );
|
||||||
if( uiScale == null )
|
|
||||||
uiScale = System.getProperty( "sun.java2d.uiScale" );
|
|
||||||
|
|
||||||
float scaleFactor = parseScaleFactor( uiScale );
|
float scaleFactor = parseScaleFactor( uiScale );
|
||||||
if( scaleFactor <= 0 )
|
if( scaleFactor <= 0 )
|
||||||
return font;
|
return font;
|
||||||
|
|||||||
Reference in New Issue
Block a user