mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-08 06:50:56 +03:00
added user scale factor to UI defaults to allow layout managers (e.g. MigLayout) to use it
(see https://github.com/mikaelgrev/miglayout/pull/76)
This commit is contained in:
@@ -321,6 +321,11 @@ public abstract class FlatLaf
|
||||
for( FlatDefaultsAddon addon : addons )
|
||||
addon.afterDefaultsLoading( this, defaults );
|
||||
|
||||
// add user scale factor to allow layout managers (e.g. MigLayout) to use it
|
||||
defaults.put( "laf.scaleFactor", (ActiveValue) t -> {
|
||||
return UIScale.getUserScaleFactor();
|
||||
} );
|
||||
|
||||
if( postInitialization != null ) {
|
||||
postInitialization.accept( defaults );
|
||||
postInitialization = null;
|
||||
|
||||
Reference in New Issue
Block a user