added system properties "flatlaf.animation" and "flatlaf.smoothScrolling" to disable all animations or smooth scrolling via command line (without modifying the application)

This commit is contained in:
Karl Tauber
2020-08-08 16:19:36 +02:00
parent fdabca99b2
commit 1ebfe00f3c
7 changed files with 53 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ public class FlatAnimatedLafChange
* Invoke before setting new look and feel.
*/
public static void showSnapshot() {
if( !FlatSystemProperties.getBoolean( "flatlaf.animatedLafChange", true ) )
if( !Animator.useAnimation() || !FlatSystemProperties.getBoolean( "flatlaf.animatedLafChange", true ) )
return;
// stop already running animation
@@ -138,7 +138,7 @@ public class FlatAnimatedLafChange
* Invoke after updating UI.
*/
public static void hideSnapshotWithAnimation() {
if( !FlatSystemProperties.getBoolean( "flatlaf.animatedLafChange", true ) )
if( !Animator.useAnimation() || !FlatSystemProperties.getBoolean( "flatlaf.animatedLafChange", true ) )
return;
if( oldUIsnapshots.isEmpty() )