Login Scene is not resizable, logo gets loaded correctly
This commit is contained in:
		@@ -125,6 +125,8 @@ public final class SceneContext {
 | 
			
		||||
 | 
			
		||||
			sceneStack.push(scene);
 | 
			
		||||
			stage.setScene(scene);
 | 
			
		||||
			if (sceneInfo == SceneInfo.LOGIN_SCENE) stage.setResizable(false);
 | 
			
		||||
			else stage.setResizable(true);
 | 
			
		||||
			applyCSS();
 | 
			
		||||
			stage.sizeToScene();
 | 
			
		||||
			stage.show();
 | 
			
		||||
 
 | 
			
		||||
@@ -11,10 +11,12 @@ import javafx.fxml.FXML;
 | 
			
		||||
import javafx.geometry.Insets;
 | 
			
		||||
import javafx.scene.control.*;
 | 
			
		||||
import javafx.scene.control.Alert.AlertType;
 | 
			
		||||
import javafx.scene.image.ImageView;
 | 
			
		||||
 | 
			
		||||
import envoy.client.data.*;
 | 
			
		||||
import envoy.client.net.Client;
 | 
			
		||||
import envoy.client.net.WriteProxy;
 | 
			
		||||
import envoy.client.ui.IconUtil;
 | 
			
		||||
import envoy.client.ui.SceneContext;
 | 
			
		||||
import envoy.client.ui.Startup;
 | 
			
		||||
import envoy.data.LoginCredentials;
 | 
			
		||||
@@ -61,6 +63,9 @@ public final class LoginScene {
 | 
			
		||||
	@FXML
 | 
			
		||||
	private Label registerTextLabel;
 | 
			
		||||
 | 
			
		||||
	@FXML
 | 
			
		||||
	private ImageView logo;
 | 
			
		||||
 | 
			
		||||
	private Client			client;
 | 
			
		||||
	private LocalDB			localDB;
 | 
			
		||||
	private CacheMap		cacheMap;
 | 
			
		||||
@@ -78,6 +83,8 @@ public final class LoginScene {
 | 
			
		||||
 | 
			
		||||
		// Show an alert after an unsuccessful handshake
 | 
			
		||||
		eventBus.register(HandshakeRejection.class, e -> Platform.runLater(() -> { new Alert(AlertType.ERROR, e.get()).showAndWait(); }));
 | 
			
		||||
 | 
			
		||||
		logo.setImage(IconUtil.loadIcon("envoy_logo"));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 | 
			
		||||
<VBox id="loginBackground" alignment="TOP_CENTER" prefHeight="500.0" prefWidth="350.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="envoy.client.ui.controller.LoginScene">
 | 
			
		||||
	<children>
 | 
			
		||||
      <ImageView fitHeight="80.0" fitWidth="80.0" pickOnBounds="true" preserveRatio="true">
 | 
			
		||||
      <ImageView fx:id="logo" fitHeight="80.0" fitWidth="80.0" pickOnBounds="true" preserveRatio="true">
 | 
			
		||||
         <VBox.margin>
 | 
			
		||||
            <Insets bottom="10.0" top="50.0" />
 | 
			
		||||
         </VBox.margin>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user