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