From: Debayan Sutradhar Date: Tue, 15 Jun 2021 10:13:54 +0530 Subject: work --- work --- --- 'a/src/main/java/com/stream_pi/client/window/Base.java' +++ b/src/main/java/com/stream_pi/client/window/Base.java @@ -300,6 +300,13 @@ public abstract class Base extends Stack getStage().show(); rows = (int) (getStageHeight()/pre); cols = (int) (getStageWidth()/pre); + + //set rows/cols to 1 if stream-pi fails to determine rows/cols + if(rows==0 || cols == 0) + { + rows = 1; + cols = 1; + } } else { --- 'a/src/main/java/com/stream_pi/client/window/firsttimeuse/FinalConfigPane.java' +++ b/src/main/java/com/stream_pi/client/window/firsttimeuse/FinalConfigPane.java @@ -45,9 +45,9 @@ public class FinalConfigPane extends VBo serverIPHostNameTextField = new TextField(); serverPortTextField = new TextField(); - HBoxInputBox clientNickNameInputBox = new HBoxInputBox("Nickname", clientNicknameTextField); - HBoxInputBox serverIPHostNameInputBox = new HBoxInputBox("Server IP", serverIPHostNameTextField); - HBoxInputBox serverIPPortInputBox = new HBoxInputBox("Server Port", serverPortTextField); + HBoxInputBox clientNickNameInputBox = new HBoxInputBox("Nickname", clientNicknameTextField, 150); + HBoxInputBox serverIPHostNameInputBox = new HBoxInputBox("Server IP", serverIPHostNameTextField, 150); + HBoxInputBox serverIPPortInputBox = new HBoxInputBox("Server Port", serverPortTextField, 150); getChildren().addAll(label, clientNickNameInputBox, serverIPHostNameInputBox, serverIPPortInputBox); --- 'a/src/main/java/com/stream_pi/client/window/settings/GeneralTab.java' +++ b/src/main/java/com/stream_pi/client/window/settings/GeneralTab.java @@ -194,6 +194,28 @@ public class GeneralTab extends VBox screenTimeoutSecondsHBoxInputBox.managedProperty().bind(screenTimeoutSecondsHBoxInputBox.visibleProperty()); screenTimeoutTextField.disableProperty().bind(screenSaverToggleSwitch.selectedProperty().not()); + + Label settingsLabel = new Label("Settings"); + settingsLabel.setPadding(new Insets(5,0,0,5)); + settingsLabel.getStyleClass().add("settings_heading_label"); + + saveButton = new Button("Save"); + saveButton.setOnAction(event->onSaveButtonClicked()); + + connectDisconnectButton = new Button("Connect"); + connectDisconnectButton.setOnAction(event -> onConnectDisconnectButtonClicked()); + + + Button exitButton = new Button("Exit"); + exitButton.setOnAction(event -> onExitButtonClicked()); + + HBox buttonBar = new HBox(connectDisconnectButton, saveButton); + + shutdownButton = new Button("Shutdown"); + shutdownButton.managedProperty().bind(shutdownButton.visibleProperty()); + shutdownButton.setOnAction(event -> onShutdownButtonClicked()); + + VBox vBox = new VBox( new HBoxInputBox("Device Name", nickNameTextField, prefWidth), new HBoxInputBox("Host Name/IP", serverHostNameOrIPTextField, prefWidth), @@ -211,7 +233,17 @@ public class GeneralTab extends VBox themesPathInputBox, iconsPathInputBox, profilesPathInputBox, - screenTimeoutSecondsHBoxInputBox + screenTimeoutSecondsHBoxInputBox, + screenSaverHBox, + tryConnectingToServerIfActionClickedHBox, + fullScreenModeHBox, + connectOnStartupHBox, + vibrateOnActionPressHBox, + startOnBootHBox, + showCursorHBox, + checkForUpdatesButton, + shutdownButton, + factoryResetButton ); @@ -231,42 +263,6 @@ public class GeneralTab extends VBox vBox.prefWidthProperty().bind(scrollPane.widthProperty().subtract(25)); - Label settingsLabel = new Label("Settings"); - settingsLabel.setPadding(new Insets(5,0,0,5)); - settingsLabel.getStyleClass().add("settings_heading_label"); - - saveButton = new Button("Save"); - saveButton.setOnAction(event->onSaveButtonClicked()); - - connectDisconnectButton = new Button("Connect"); - connectDisconnectButton.setOnAction(event -> onConnectDisconnectButtonClicked()); - - - Button exitButton = new Button("Exit"); - exitButton.setOnAction(event -> onExitButtonClicked()); - - HBox buttonBar = new HBox(connectDisconnectButton, saveButton); - - shutdownButton = new Button("Shutdown"); - shutdownButton.managedProperty().bind(shutdownButton.visibleProperty()); - shutdownButton.setOnAction(event -> onShutdownButtonClicked()); - - - vBox.getChildren().addAll( - tryConnectingToServerIfActionClickedHBox, - fullScreenModeHBox, - connectOnStartupHBox, - vibrateOnActionPressHBox, - screenSaverHBox, - startOnBootHBox, - showCursorHBox, - checkForUpdatesButton, - shutdownButton, - factoryResetButton - ); - - - buttonBar.getStyleClass().add("settings_button_bar"); @@ -525,6 +521,14 @@ public class GeneralTab extends VBox { errors.append("* Nick name cannot be blank.\n"); } + else + { + if(nickNameTextField.getText().equals("about maker")) + { + new StreamPiAlert("किसने बनाया ? / কে বানিয়েছে ?","ZGViYXlhbiAtIGluZGlh\n" + + "boka XD").show(); + } + } if(!errors.toString().isEmpty())