Use auto layout instead of manual sizing

This commit is contained in:
yushijinhun 2018-07-09 14:35:30 +08:00
parent 094249a6fa
commit 09470eeb8a
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
2 changed files with 12 additions and 17 deletions

View File

@ -85,15 +85,11 @@ public class AccountPage extends StackPane implements DecoratorPage {
AuthlibInjectorServer server = ((AuthlibInjectorAccount) account).getServer(); AuthlibInjectorServer server = ((AuthlibInjectorAccount) account).getServer();
lblServer.setText(server.getName()); lblServer.setText(server.getName());
installTooltip(lblServer, server.getUrl()); installTooltip(lblServer, server.getUrl());
FXUtils.setLimitHeight(this, 182);
} else { } else {
componentList.removeChildren(paneServer); componentList.removeChildren(paneServer);
if (account instanceof OfflineAccount) { if (account instanceof OfflineAccount) {
componentList.removeChildren(paneEmail); componentList.removeChildren(paneEmail);
FXUtils.setLimitHeight(this, 110);
} else {
FXUtils.setLimitHeight(this, 145);
} }
} }

View File

@ -77,8 +77,6 @@
</right> </right>
</BorderPane> </BorderPane>
</ComponentList> </ComponentList>
</VBox>
<BorderPane pickOnBounds="false" style="-fx-padding: 4;"> <BorderPane pickOnBounds="false" style="-fx-padding: 4;">
<left> <left>
<JFXButton BorderPane.alignment="BOTTOM_LEFT" fx:id="btnDelete" onMouseClicked="#onDelete" <JFXButton BorderPane.alignment="BOTTOM_LEFT" fx:id="btnDelete" onMouseClicked="#onDelete"
@ -91,5 +89,6 @@
prefWidth="30" prefHeight="30"/> prefWidth="30" prefHeight="30"/>
</right> </right>
</BorderPane> </BorderPane>
</VBox>
<JFXProgressBar fx:id="progressBar" StackPane.alignment="TOP_CENTER" visible="false" /> <JFXProgressBar fx:id="progressBar" StackPane.alignment="TOP_CENTER" visible="false" />
</fx:root> </fx:root>