feat(ui): 为登录和平台选择页面的按钮添加手型光标样式

在登录页面和平台选择页面中,为按钮添加了鼠标悬停时显示手型光标的样式,
以提升用户交互体验。
```
This commit is contained in:
wangchunxiang
2025-10-13 17:22:42 +08:00
parent bdc34b9fae
commit 693fedfef5
2 changed files with 4 additions and 0 deletions

View File

@@ -53,6 +53,8 @@ public class LoginView {
Button loginButton = new Button("登 录");
loginButton.setStyle("-fx-background-color: #3f51b5; -fx-text-fill: white;");
loginButton.setPrefWidth(300);
// 设置鼠标悬停时为手型光标
loginButton.setCursor(javafx.scene.Cursor.HAND);
// 添加登录按钮事件处理
loginButton.setOnAction(e -> {

View File

@@ -86,6 +86,7 @@ public class PlatformSelectionView {
Button connectButton = new Button("立即连接");
connectButton.setCursor(javafx.scene.Cursor.HAND);
connectButton.setStyle("-fx-background-color: " + buttonColor + "; -fx-text-fill: white; -fx-padding: 10px 20px; -fx-border-radius: 4px;");
connectButton.setOnAction(event -> {
@@ -114,6 +115,7 @@ public class PlatformSelectionView {
titleLabel.setStyle("-fx-font-size: 16px; -fx-font-weight: bold;");
Button connectButton = new Button("立即连接");
connectButton.setCursor(javafx.scene.Cursor.HAND);
connectButton.setStyle("-fx-background-color: " + buttonColor + "; -fx-text-fill: white; -fx-padding: 10px 20px; -fx-border-radius: 4px;");
option.getChildren().addAll(imageView, titleLabel, connectButton);