mirror of
https://github.com/HMCL-dev/HMCL
synced 2026-08-19 22:23:08 -04:00
parent
81634b14df
commit
c8929c80d9
1 changed files with 2 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ import javafx.animation.Timeline;
|
|||
import javafx.scene.Parent;
|
||||
import javafx.scene.shape.SVGPath;
|
||||
import javafx.util.Duration;
|
||||
import org.jackhuang.hmcl.ui.animation.AnimationUtils;
|
||||
import org.jackhuang.hmcl.ui.animation.Motion;
|
||||
|
||||
/// A lightweight wrapper for displaying [SVG] icons.
|
||||
|
|
@ -108,7 +109,7 @@ public final class SVGContainer extends Parent {
|
|||
SVG oldIcon = this.icon;
|
||||
this.icon = newIcon;
|
||||
|
||||
if (animationDuration.equals(Duration.ZERO)) {
|
||||
if (animationDuration.equals(Duration.ZERO) || !AnimationUtils.isAnimationEnabled()) {
|
||||
path.setContent(newIcon.getPath());
|
||||
path.setOpacity(1);
|
||||
if (getChildren().size() != 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue