Skip to content

Commit

Permalink
add theming to Alert. fixes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouckaert committed Sep 8, 2022
1 parent 6aad9c7 commit 9eb3c1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/beastfx/app/util/Alert.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static void showMessageDialog(Parent parent, String message) {
alert.setX(node.getX() + node.getWidth()/2);
alert.setY(node.getY() + node.getHeight()/2);
}
// ThemeProvider.loadStyleSheet(alert.getDialogPane().getScene());
ThemeProvider.loadStyleSheet(alert.getDialogPane().getScene());
alert.showAndWait();
}

Expand All @@ -100,7 +100,7 @@ public static ButtonType showConfirmDialog(Parent parent, String message, String
alert.setX(node.getX() + node.getWidth()/2);
alert.setY(node.getY() + node.getHeight()/2);
}
// ThemeProvider.loadStyleSheet(alert.getDialogPane().getScene());
ThemeProvider.loadStyleSheet(alert.getDialogPane().getScene());
Optional<ButtonType> option = alert.showAndWait();
return option.get();
}
Expand All @@ -120,7 +120,7 @@ public static void showMessageDialog(Parent parent, String message, String heade
alert.setX(node.getX() + node.getWidth()/2);
alert.setY(node.getY() + node.getHeight()/2);
}
// ThemeProvider.loadStyleSheet(alert.getDialogPane().getScene());
ThemeProvider.loadStyleSheet(alert.getDialogPane().getScene());
alert.showAndWait();
}

Expand Down Expand Up @@ -173,7 +173,7 @@ public static void showMessageDialog(Parent parent, Node message, String header,
pane.setPrefHeight(600);
pane.setPrefWidth(600);
alert.setResizable(true);
// ThemeProvider.loadStyleSheet(alert.getDialogPane().getScene());
ThemeProvider.loadStyleSheet(alert.getDialogPane().getScene());
alert.showAndWait();
}

Expand All @@ -188,7 +188,7 @@ public static Object showInputDialog(Parent parent,
values);
dlg.setTitle(title);
dlg.setHeaderText(message.toString());
// ThemeProvider.loadStyleSheet(dlg.getDialogPane().getScene());
ThemeProvider.loadStyleSheet(dlg.getDialogPane().getScene());
Optional<?> option = dlg.showAndWait();
if (parent != null) {
Scene node = parent.getScene();
Expand All @@ -214,7 +214,7 @@ public static Object showInputDialog(Parent parent,
Object message, String title, AlertType messageType, String initialSelectionValue) {
TextInputDialog dlg = new TextInputDialog(initialSelectionValue);
dlg.setHeaderText(title);
// ThemeProvider.loadStyleSheet(dlg.getDialogPane().getScene());
ThemeProvider.loadStyleSheet(dlg.getDialogPane().getScene());
Optional<?> option = dlg.showAndWait();
if (parent != null) {
Scene node = parent.getScene();
Expand Down
2 changes: 1 addition & 1 deletion src/beastfx/app/util/FXUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public static void createHMCButton(Pane pane, BEASTInterface o, Input<?> input)
//System.out.println(id);

String HMC_BASE = getHMCBase();
String url = HMC_BASE + "/" + id + "/";//.html";
String url = HMC_BASE + "/" + id;// + "/";//.html";
Button hmc = createHMCButton(url);
if (input instanceof BeautiPanelConfig.FlexibleInput) {
BeautiPanelConfig.FlexibleInput flexInput = (BeautiPanelConfig.FlexibleInput) input;
Expand Down

0 comments on commit 9eb3c1f

Please sign in to comment.