Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public UpgradeDialog(RemoteVersion remoteVersion, Runnable updateRunnable) {
cancelButton.getStyleClass().add("dialog-cancel");
cancelButton.setOnAction(e -> fireEvent(new DialogCloseEvent()));

setActions(openInBrowser, updateButton, cancelButton);
setActions(openInBrowser, cancelButton, updateButton);
onEscPressed(this, cancelButton::fire);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public ClassicAccountLoginDialog(ClassicAccount oldAccount, Consumer<AuthInfo> s
cancelButton.setOnAction(e -> onCancel());
cancelButton.getStyleClass().add("dialog-cancel");

dialogLayout.setActions(lblCreationWarning, acceptButton, cancelButton);
dialogLayout.setActions(lblCreationWarning, cancelButton, acceptButton);
}

getChildren().setAll(dialogLayout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public CreateAccountPane(AccountFactory<?> factory) {
btnCancel.setOnAction(e -> onCancel());
onEscPressed(this, btnCancel::fire);

HBox hbox = new HBox(spinner, btnCancel);
HBox hbox = new HBox(btnCancel, spinner);
hbox.setAlignment(Pos.CENTER_RIGHT);

setActions(lblErrorMessage, hbox);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public OfflineAccountSkinPane(OfflineAccount account) {
cancelButton.setOnAction(e -> fireEvent(new DialogCloseEvent()));
onEscPressed(this, cancelButton::fire);

layout.setActions(littleSkinLink, acceptButton, cancelButton);
layout.setActions(littleSkinLink, cancelButton, acceptButton);
}

private Skin getSkin() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public DialogPane() {
cancelButton.getStyleClass().add("dialog-cancel");
onEscPressed(this, cancelButton::fire);

setActions(warningLabel, acceptPane, cancelButton);
setActions(warningLabel, cancelButton, acceptPane);
}

protected JFXProgressBar getProgressBar() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public InputDialogPane(String text, String initialValue, FutureCallback<String>
JFXButton cancelButton = new JFXButton(i18n("button.cancel"));
cancelButton.getStyleClass().add("dialog-cancel");

this.setActions(lblCreationWarning, acceptPane, cancelButton);
this.setActions(lblCreationWarning, cancelButton, acceptButton);

cancelButton.setOnAction(e -> fireEvent(new DialogCloseEvent()));
acceptButton.setOnAction(e -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ public Builder addCancel(String cancelText, @Nullable Runnable cancel) {
}

public Builder yesOrNo(@Nullable Runnable yes, @Nullable Runnable no) {
addCancel(i18n("button.no"), no);

JFXButton btnYes = new JFXButton(i18n("button.yes"));
btnYes.getStyleClass().add("dialog-accept");
if (yes != null) {
btnYes.setOnAction(e -> yes.run());
}
dialog.addButton(btnYes);

addCancel(i18n("button.no"), no);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public NBTEditorPage(Path file) throws IOException {
cancelButton.setOnAction(e -> fireEvent(new PageCloseEvent()));
onEscPressed(this, cancelButton::fire);

actions.getChildren().setAll(saveButton, cancelButton);
actions.getChildren().setAll(cancelButton, saveButton);

Task.supplyAsync(() -> type.readAsTree(file))
.whenComplete(Schedulers.javafx(), (result, exception) -> {
Expand Down