Fixed: Popup now disappear if the window is not focused
This commit is contained in:
@@ -79,6 +79,7 @@ public class MainFXMLController {
|
||||
@FXML
|
||||
public void initialize() {
|
||||
Font.loadFont(getClass().getResourceAsStream("/Fonts/InknutAntiqua-Regular.ttf"), 14);
|
||||
popup = new Popup();
|
||||
mainHBox.sceneProperty().addListener((obs, oldScene, newScene) -> {
|
||||
if (newScene != null) {
|
||||
newScene.getRoot().applyCss();
|
||||
@@ -589,7 +590,6 @@ public class MainFXMLController {
|
||||
"-fx-background-radius: 10;"
|
||||
);
|
||||
|
||||
popup = new Popup();
|
||||
popup.getContent().add(popupCards);
|
||||
popup.setAutoHide(false); // gestito manualmente per permettere click sulle carte
|
||||
popup.addEventHandler(Event.ANY, e -> {
|
||||
|
||||
Reference in New Issue
Block a user