Skip to content

Commit

Permalink
support specifying custom scale factor in system property `flatlaf.ui…
Browse files Browse the repository at this point in the history
…Scale` also for Java 9 and later
  • Loading branch information
DevCharly committed Mar 31, 2020
1 parent af89dd1 commit 9429ba7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ FlatLaf Change Log
- Support changing default font used for all components with automatic scaling
UI if using larger font. Use `UIManager.put( "defaultFont", myFont );`
- No longer use system property `sun.java2d.uiScale`. (Java 8 only)
- Support specifying custom scale factor in system property `flatlaf.uiScale`
also for Java 9 and later.
- Demo: Support using own FlatLaf themes (`.properties` files) that are located
in working directory of Demo application. Shown in the "Themes" list under
category "Current Directory".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@ private static boolean isUserScalingEnabled() {
* to the given font.
*/
public static FontUIResource applyCustomScaleFactor( FontUIResource font ) {
if( UIScale.isSystemScalingEnabled() )
return font;

String uiScale = System.getProperty( "flatlaf.uiScale" );
float scaleFactor = parseScaleFactor( uiScale );
if( scaleFactor <= 0 )
Expand Down

0 comments on commit 9429ba7

Please sign in to comment.