mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-08 15:00:54 +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 )
|
for( FlatDefaultsAddon addon : addons )
|
||||||
addon.afterDefaultsLoading( this, defaults );
|
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 ) {
|
if( postInitialization != null ) {
|
||||||
postInitialization.accept( defaults );
|
postInitialization.accept( defaults );
|
||||||
postInitialization = null;
|
postInitialization = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user