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,19 +77,18 @@
</right> </right>
</BorderPane> </BorderPane>
</ComponentList> </ComponentList>
<BorderPane pickOnBounds="false" style="-fx-padding: 4;">
<left>
<JFXButton BorderPane.alignment="BOTTOM_LEFT" fx:id="btnDelete" onMouseClicked="#onDelete"
styleClass="toggle-icon4" maxWidth="30" maxHeight="30" minWidth="30" minHeight="30"
prefWidth="30" prefHeight="30"/>
</left>
<right>
<JFXButton BorderPane.alignment="BOTTOM_RIGHT" fx:id="btnRefresh" onMouseClicked="#onRefresh"
styleClass="toggle-icon4" maxWidth="30" maxHeight="30" minWidth="30" minHeight="30"
prefWidth="30" prefHeight="30"/>
</right>
</BorderPane>
</VBox> </VBox>
<BorderPane pickOnBounds="false" style="-fx-padding: 4;">
<left>
<JFXButton BorderPane.alignment="BOTTOM_LEFT" fx:id="btnDelete" onMouseClicked="#onDelete"
styleClass="toggle-icon4" maxWidth="30" maxHeight="30" minWidth="30" minHeight="30"
prefWidth="30" prefHeight="30"/>
</left>
<right>
<JFXButton BorderPane.alignment="BOTTOM_RIGHT" fx:id="btnRefresh" onMouseClicked="#onRefresh"
styleClass="toggle-icon4" maxWidth="30" maxHeight="30" minWidth="30" minHeight="30"
prefWidth="30" prefHeight="30"/>
</right>
</BorderPane>
<JFXProgressBar fx:id="progressBar" StackPane.alignment="TOP_CENTER" visible="false" /> <JFXProgressBar fx:id="progressBar" StackPane.alignment="TOP_CENTER" visible="false" />
</fx:root> </fx:root>