From 3ea054ae313d33387a29ad33ee29439959a64138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=9E=E5=BA=90?= <109708109+CiiLu@users.noreply.github.com> Date: Sun, 18 Oct 2026 20:52:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=20JFXSpinner=20=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E9=A1=BA=E6=97=B6=E9=92=88=E6=97=8B=E8=BD=AC=20(#7000)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jfoenix/skins/JFXSpinnerSkin.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/HMCL/src/main/java/com/jfoenix/skins/JFXSpinnerSkin.java b/HMCL/src/main/java/com/jfoenix/skins/JFXSpinnerSkin.java index 9dd9d65fa4..7cc818f253 100644 --- a/HMCL/src/main/java/com/jfoenix/skins/JFXSpinnerSkin.java +++ b/HMCL/src/main/java/com/jfoenix/skins/JFXSpinnerSkin.java @@ -69,7 +69,7 @@ public class JFXSpinnerSkin extends SkinBase { arc = new Arc(); arc.setManaged(false); - arc.setLength(180); + arc.setLength(-180); arc.getStyleClass().setAll("arc"); arc.setFill(Color.TRANSPARENT); arc.setStrokeWidth(DEFAULT_STROKE_WIDTH); @@ -192,24 +192,24 @@ public class JFXSpinnerSkin extends SkinBase { private void addKeyFrames(List frames, double angle, double duration) { frames.add(new KeyFrame(Duration.seconds(duration), - new KeyValue(arc.lengthProperty(), 5, Interpolator.LINEAR), + new KeyValue(arc.lengthProperty(), -5, Interpolator.LINEAR), new KeyValue(arc.startAngleProperty(), - angle + 45 + startingAngle, + -(angle + 45 + startingAngle), Interpolator.LINEAR))); frames.add(new KeyFrame(Duration.seconds(duration + 0.4), - new KeyValue(arc.lengthProperty(), 250, Interpolator.LINEAR), + new KeyValue(arc.lengthProperty(), -250, Interpolator.LINEAR), new KeyValue(arc.startAngleProperty(), - angle + 90 + startingAngle, + -(angle + 90 + startingAngle), Interpolator.LINEAR))); frames.add(new KeyFrame(Duration.seconds(duration + 0.7), - new KeyValue(arc.lengthProperty(), 250, Interpolator.LINEAR), + new KeyValue(arc.lengthProperty(), -250, Interpolator.LINEAR), new KeyValue(arc.startAngleProperty(), - angle + 135 + startingAngle, + -(angle + 135 + startingAngle), Interpolator.LINEAR))); frames.add(new KeyFrame(Duration.seconds(duration + 1.1), - new KeyValue(arc.lengthProperty(), 5, Interpolator.LINEAR), + new KeyValue(arc.lengthProperty(), -5, Interpolator.LINEAR), new KeyValue(arc.startAngleProperty(), - angle + 435 + startingAngle, + -(angle + 435 + startingAngle), Interpolator.LINEAR))); } @@ -222,21 +222,21 @@ public class JFXSpinnerSkin extends SkinBase { addKeyFrames(keyFrames, 900, 2.8); addKeyFrames(keyFrames, 1350, 4.2); keyFrames.add(new KeyFrame(Duration.seconds(5.6), - new KeyValue(arc.lengthProperty(), 5, Interpolator.LINEAR), + new KeyValue(arc.lengthProperty(), -5, Interpolator.LINEAR), new KeyValue(arc.startAngleProperty(), - 1845 + startingAngle, + -(1845 + startingAngle), Interpolator.LINEAR))); timeline = new Timeline(); timeline.getKeyFrames().setAll(keyFrames); } else { - final double arcLength = 250; + final double arcLength = -250; timeline = new Timeline( new KeyFrame(Duration.ZERO, - new KeyValue(arc.startAngleProperty(), 45 + startingAngle, Interpolator.LINEAR), + new KeyValue(arc.startAngleProperty(), -(45 + startingAngle), Interpolator.LINEAR), new KeyValue(arc.lengthProperty(), arcLength, Interpolator.DISCRETE)), new KeyFrame(Duration.seconds(1.2), - new KeyValue(arc.startAngleProperty(), 45 + 360 + startingAngle, Interpolator.LINEAR), + new KeyValue(arc.startAngleProperty(), -(45 + 360 + startingAngle), Interpolator.LINEAR), new KeyValue(arc.lengthProperty(), arcLength, Interpolator.DISCRETE)) ); }