From 46f8b1e76732b231a129ef527253bad99909d3e7 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Wed, 10 Jun 2020 10:05:25 +0200 Subject: [PATCH] Adjust stage size after changing the scene --- src/main/java/envoy/client/ui/SceneContext.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/envoy/client/ui/SceneContext.java b/src/main/java/envoy/client/ui/SceneContext.java index 0c40bf3..c191d8e 100644 --- a/src/main/java/envoy/client/ui/SceneContext.java +++ b/src/main/java/envoy/client/ui/SceneContext.java @@ -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(); }