完善页面逻辑 #8

Merged
hnu202326010207 merged 1 commits from yinhaoming_branch into develop 5 months ago

@ -10,6 +10,7 @@ import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.control.PasswordField;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TextField;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.GridPane;
@ -55,7 +56,7 @@ public class RegistrationScene extends BorderPane {
private void initializeUi() {
// 创建主布局
VBox mainLayout = new VBox(15);
mainLayout.setAlignment(Pos.CENTER);
mainLayout.setAlignment(Pos.TOP_CENTER);
mainLayout.setPadding(new Insets(20));
// 标题
@ -143,7 +144,11 @@ public class RegistrationScene extends BorderPane {
// 将组件添加到主布局
mainLayout.getChildren().addAll(titleLabel, registrationForm, backButton);
setCenter(mainLayout);
// 使用可滚动容器保证内容在小窗口中完整显示
ScrollPane scrollPane = new ScrollPane(mainLayout);
scrollPane.setFitToWidth(true);
scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
setCenter(scrollPane);
// 添加事件处理器
addEventHandlers(sendCodeButton, verificationSection, verifyCodeButton, passwordSection);

Loading…
Cancel
Save