From: Debayan Sutradhar Date: Wed, 21 Apr 2021 21:47:40 +0530 Subject: Updated readme, fix major row/col bug --- Updated readme, fix major row/col bug --- --- 'a/README.md' +++ b/README.md @@ -11,8 +11,8 @@ This project depends on the following Stream-Pi modules: -- [Stream-Pi Action API](https://github.com/stream-pi/actionapi) -- [Stream-Pi Theme API](https://github.com/stream-pi/themeapi) +- [Stream-Pi Action API](https://github.com/stream-pi/action-api) +- [Stream-Pi Theme API](https://github.com/stream-pi/theme-api) - [Stream-Pi Utilities](https://github.com/stream-pi/util) Build and run using `mvn clean javafx:run` --- 'a/src/main/java/com/stream_pi/server/connection/MainServer.java' +++ b/src/main/java/com/stream_pi/server/connection/MainServer.java @@ -130,7 +130,7 @@ public class MainServer extends Thread { } } - Platform.runLater(()-> serverListener.getStage().setTitle("Stream-Pi Server - IP(s): "+ips.toString()+" | Port: "+ port)); + Platform.runLater(()-> serverListener.getStage().setTitle("Stream-Pi Server - IP(s): "+ips+" | Port: "+ port)); } else { --- 'a/src/main/java/com/stream_pi/server/controller/Controller.java' +++ b/src/main/java/com/stream_pi/server/controller/Controller.java @@ -291,7 +291,11 @@ public class Controller extends Base imp popup ); - trayIcon.addActionListener(l-> Platform.runLater(()-> getStage().show())); + trayIcon.addActionListener(l-> Platform.runLater(()-> { + getStage().show(); + getStage().setAlwaysOnTop(true); + getStage().setAlwaysOnTop(false); + })); trayIcon.setImageAutoSize(true); --- 'a/src/main/java/com/stream_pi/server/window/dashboard/actiongridpane/ActionGridPane.java' +++ b/src/main/java/com/stream_pi/server/window/dashboard/actiongridpane/ActionGridPane.java @@ -288,7 +288,7 @@ public class ActionGridPane extends Scro ActionBox actionBox = new ActionBox(Config.getInstance().getActionGridActionSize(), actionDetailsPaneListener, this, col, row); - actionsGridPane.add(actionBox, row, col); + actionsGridPane.add(actionBox, col, row); return actionBox; } --- 'a/src/main/java/com/stream_pi/server/window/settings/ClientsSettings.java' +++ b/src/main/java/com/stream_pi/server/window/settings/ClientsSettings.java @@ -122,8 +122,9 @@ public class ClientsSettings extends VBo int rows = Integer.parseInt(clientProfileVBox.getRows()); int actionsSize = Integer.parseInt(clientProfileVBox.getActionSize()); + int actionsGap = Integer.parseInt(clientProfileVBox.getActionGap()); - if((rows*actionsSize) > (clientSettingsVBox.getDisplayWidth() - 50)) + if((rows*(actionsSize+actionsGap)) > clientSettingsVBox.getDisplayHeight()) { errors2.append(" Rows out of bounds of screen size. \n"); } @@ -138,8 +139,9 @@ public class ClientsSettings extends VBo int cols = Integer.parseInt(clientProfileVBox.getCols()); int actionsSize = Integer.parseInt(clientProfileVBox.getActionSize()); + int actionsGap = Integer.parseInt(clientProfileVBox.getActionGap()); - if((cols*actionsSize) > (clientSettingsVBox.getDisplayHeight() - 50)) + if((cols*(actionsSize+actionsGap)) > clientSettingsVBox.getDisplayWidth()) { errors2.append(" Cols out of bounds of screen size. \n"); } @@ -629,10 +631,10 @@ public class ClientsSettings extends VBo getChildren().addAll( new HBoxInputBox("Name ", nameTextField), - new HBoxInputBox("Columns", rowsTextField), - new HBoxInputBox("Rows", colsTextField), - new HBoxInputBox("action Size", actionSizeTextField), - new HBoxInputBox("action Gap", actionGapTextField), + new HBoxInputBox("Rows", rowsTextField), + new HBoxInputBox("Columns", colsTextField), + new HBoxInputBox("Action Size", actionSizeTextField), + new HBoxInputBox("Action Gap", actionGapTextField), hBox ); }