Adjust stage size after changing the scene
This commit is contained in:
parent
b068796f46
commit
46f8b1e767
@ -108,6 +108,7 @@ public final class SceneContext {
|
||||
sceneStack.push(scene);
|
||||
stage.setScene(scene);
|
||||
applyCSS();
|
||||
stage.sizeToScene();
|
||||
stage.show();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
@ -124,6 +125,7 @@ public final class SceneContext {
|
||||
if (!sceneStack.isEmpty()) {
|
||||
stage.setScene(sceneStack.peek());
|
||||
applyCSS();
|
||||
stage.sizeToScene();
|
||||
}
|
||||
stage.show();
|
||||
}
|
||||
|
Reference in New Issue
Block a user