From 4b36f8ce038654395aa968e1e4606e5b8eeea239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=9E=E5=BA=90?= <109708109+CiiLu@users.noreply.github.com> Date: Thu, 16 Jul 2026 21:28:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=BB=E5=8A=A1=E7=AA=97=E5=8F=A3?= =?UTF-8?q?=E9=80=9F=E5=BA=A6=E4=B8=8E=E5=8F=96=E6=B6=88=E6=9C=AA=E5=AF=B9?= =?UTF-8?q?=E9=BD=90=20(#6140)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/construct/TaskExecutorDialogPane.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TaskExecutorDialogPane.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TaskExecutorDialogPane.java index 6f198f6842..63db5fcd61 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TaskExecutorDialogPane.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TaskExecutorDialogPane.java @@ -21,11 +21,12 @@ import com.jfoenix.controls.JFXButton; import javafx.application.Platform; import javafx.beans.property.StringProperty; import javafx.geometry.Insets; +import javafx.geometry.Pos; import javafx.scene.control.Label; -import javafx.scene.layout.BorderPane; -import javafx.scene.layout.Priority; -import javafx.scene.layout.VBox; -import org.jackhuang.hmcl.task.*; +import javafx.scene.layout.*; +import org.jackhuang.hmcl.task.FetchTask; +import org.jackhuang.hmcl.task.TaskExecutor; +import org.jackhuang.hmcl.task.TaskListener; import org.jackhuang.hmcl.ui.FXUtils; import org.jackhuang.hmcl.util.TaskCancellationAction; import org.jackhuang.hmcl.util.i18n.I18n; @@ -67,16 +68,18 @@ public class TaskExecutorDialogPane extends BorderPane { center.getChildren().setAll(lblTitle, taskListPane); } - BorderPane bottom = new BorderPane(); - this.setBottom(bottom); + HBox bottom = new HBox(); + bottom.setAlignment(Pos.CENTER_LEFT); bottom.setPadding(new Insets(0, 8, 8, 8)); + bottom.setSpacing(8); + this.setBottom(bottom); { lblProgress = new Label(); - bottom.setLeft(lblProgress); - + Region spacer = new Region(); + HBox.setHgrow(spacer, Priority.ALWAYS); btnCancel = new JFXButton(i18n("button.cancel")); btnCancel.getStyleClass().add("dialog-cancel"); - bottom.setRight(btnCancel); + bottom.getChildren().setAll(lblProgress, spacer, btnCancel); } setCancel(cancel);