Skip to content
Permalink
Browse files

set min window dimension 800x600, extracted magic numbers into consta…

…nt vars
  • Loading branch information...
AlmasB committed May 29, 2019
1 parent 4c02f27 commit 48ed593f44f35414f2d9ec7c6b2f7dcf37daa1d8
Showing with 9 additions and 2 deletions.
  1. +9 −2 FXyz-Client/src/main/java/org/fxyz3d/client/FXyzClient.java
@@ -83,6 +83,13 @@
BACKGROUNDS = FXyzClient.class.getResource("/org/fxyz3d/client/clientBackgrounds.css").toExternalForm(),
BLACK_GLASS_BASE = FXyzClient.class.getResource("/org/fxyz3d/client/smokeBlackGlassBase.css").toExternalForm();
//BLACK_GLASS_CONTROLS = FXyzClient.class.getResource("/org/fxyz3d/client/smokeBlackGlassControls.css").toExternalForm();

private static final int MIN_WINDOW_WIDTH = 800;
private static final int MIN_WINDOW_HEIGHT = 600;

private static final int INITIAL_WINDOW_WIDTH = 1200;
private static final int INITIAL_WINDOW_HEIGHT = 768;

private static FXyzClient rootClientInstance;

public FXyzClient() {
@@ -193,7 +200,7 @@ protected void updateItem(FXyzSample item, boolean empty) {
client.setLeft(leftSideContent);
client.setTriggerDistance(20);

frame = new SimpleWindowFrame(stage, 1280, 800);
frame = new SimpleWindowFrame(stage, MIN_WINDOW_WIDTH, MIN_WINDOW_HEIGHT);
frame.setText("Fxyz-SamplerApp <ver: 0.1.1>");
frame.setRootContent(client);

@@ -205,7 +212,7 @@ protected void updateItem(FXyzSample item, boolean empty) {
changeToWelcomePage(null);
}

Scene scene = new Scene(frame, 1200, 768);
Scene scene = new Scene(frame, INITIAL_WINDOW_WIDTH, INITIAL_WINDOW_HEIGHT);
scene.setFill(Color.TRANSPARENT);
scene.getStylesheets().addAll(BLACK_GLASS_BASE);

0 comments on commit 48ed593

Please sign in to comment.
You can’t perform that action at this time.