|
29 | 29 | import javafx.stage.FileChooser.ExtensionFilter;
|
30 | 30 | import javafx.stage.Modality;
|
31 | 31 | import javafx.stage.Stage;
|
| 32 | +import javafx.stage.StageStyle; |
32 | 33 | import org.controlsfx.control.StatusBar;
|
33 | 34 |
|
34 | 35 | import javax.inject.Inject;
|
@@ -70,6 +71,8 @@ public class MainWindowController {
|
70 | 71 | @Inject
|
71 | 72 | private Project project;
|
72 | 73 |
|
| 74 | + private Stage aboutDialogStage; |
| 75 | + |
73 | 76 | public void initialize() {
|
74 | 77 | pipelineView.prefHeightProperty().bind(bottomPane.heightProperty());
|
75 | 78 | statusBar.getLeftItems().add(startStoppableButtonFactory.create(pipelineRunner));
|
@@ -216,13 +219,16 @@ public void showProjectSettingsEditor() {
|
216 | 219 |
|
217 | 220 | @FXML
|
218 | 221 | public void showProjectAboutDialog() throws IOException {
|
219 |
| - Stage aboutDialogStage = new Stage(); |
220 |
| - if (aboutPane.getScene() != null) { |
221 |
| - aboutDialogStage.setScene(aboutPane.getScene()); |
222 |
| - } else { |
| 222 | + if (aboutDialogStage == null) { |
| 223 | + aboutDialogStage = new Stage(); |
223 | 224 | aboutDialogStage.setScene(new Scene(aboutPane));
|
| 225 | + aboutDialogStage.initStyle(StageStyle.UNDECORATED); |
| 226 | + aboutDialogStage.focusedProperty().addListener((observable, oldvalue, newvalue) -> { |
| 227 | + if (oldvalue) { |
| 228 | + aboutDialogStage.hide(); |
| 229 | + } |
| 230 | + }); |
224 | 231 | }
|
225 |
| - aboutDialogStage.initModality(Modality.APPLICATION_MODAL); |
226 | 232 | aboutDialogStage.show();
|
227 | 233 | }
|
228 | 234 |
|
|
0 commit comments