|
21 | 21 | import javafx.application.Platform; |
22 | 22 | import javafx.beans.property.StringProperty; |
23 | 23 | import javafx.geometry.Insets; |
| 24 | +import javafx.geometry.Pos; |
24 | 25 | import javafx.scene.control.Label; |
25 | | -import javafx.scene.layout.BorderPane; |
26 | | -import javafx.scene.layout.Priority; |
27 | | -import javafx.scene.layout.VBox; |
28 | | -import org.jackhuang.hmcl.task.*; |
| 26 | +import javafx.scene.layout.*; |
| 27 | +import org.jackhuang.hmcl.task.FetchTask; |
| 28 | +import org.jackhuang.hmcl.task.TaskExecutor; |
| 29 | +import org.jackhuang.hmcl.task.TaskListener; |
29 | 30 | import org.jackhuang.hmcl.ui.FXUtils; |
30 | 31 | import org.jackhuang.hmcl.util.TaskCancellationAction; |
31 | 32 | import org.jackhuang.hmcl.util.i18n.I18n; |
@@ -67,16 +68,18 @@ public TaskExecutorDialogPane(@NotNull TaskCancellationAction cancel) { |
67 | 68 | center.getChildren().setAll(lblTitle, taskListPane); |
68 | 69 | } |
69 | 70 |
|
70 | | - BorderPane bottom = new BorderPane(); |
71 | | - this.setBottom(bottom); |
| 71 | + HBox bottom = new HBox(); |
| 72 | + bottom.setAlignment(Pos.CENTER_LEFT); |
72 | 73 | bottom.setPadding(new Insets(0, 8, 8, 8)); |
| 74 | + bottom.setSpacing(8); |
| 75 | + this.setBottom(bottom); |
73 | 76 | { |
74 | 77 | lblProgress = new Label(); |
75 | | - bottom.setLeft(lblProgress); |
76 | | - |
| 78 | + Region spacer = new Region(); |
| 79 | + HBox.setHgrow(spacer, Priority.ALWAYS); |
77 | 80 | btnCancel = new JFXButton(i18n("button.cancel")); |
78 | 81 | btnCancel.getStyleClass().add("dialog-cancel"); |
79 | | - bottom.setRight(btnCancel); |
| 82 | + bottom.getChildren().setAll(lblProgress, spacer, btnCancel); |
80 | 83 | } |
81 | 84 |
|
82 | 85 | setCancel(cancel); |
|
0 commit comments