```
feat(ui): 为登录和平台选择页面的按钮添加手型光标样式 在登录页面和平台选择页面中,为按钮添加了鼠标悬停时显示手型光标的样式, 以提升用户交互体验。 ```
This commit is contained in:
@@ -53,6 +53,8 @@ public class LoginView {
|
|||||||
Button loginButton = new Button("登 录");
|
Button loginButton = new Button("登 录");
|
||||||
loginButton.setStyle("-fx-background-color: #3f51b5; -fx-text-fill: white;");
|
loginButton.setStyle("-fx-background-color: #3f51b5; -fx-text-fill: white;");
|
||||||
loginButton.setPrefWidth(300);
|
loginButton.setPrefWidth(300);
|
||||||
|
// 设置鼠标悬停时为手型光标
|
||||||
|
loginButton.setCursor(javafx.scene.Cursor.HAND);
|
||||||
|
|
||||||
// 添加登录按钮事件处理
|
// 添加登录按钮事件处理
|
||||||
loginButton.setOnAction(e -> {
|
loginButton.setOnAction(e -> {
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ public class PlatformSelectionView {
|
|||||||
|
|
||||||
|
|
||||||
Button connectButton = new Button("立即连接");
|
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.setStyle("-fx-background-color: " + buttonColor + "; -fx-text-fill: white; -fx-padding: 10px 20px; -fx-border-radius: 4px;");
|
||||||
|
|
||||||
connectButton.setOnAction(event -> {
|
connectButton.setOnAction(event -> {
|
||||||
@@ -114,6 +115,7 @@ public class PlatformSelectionView {
|
|||||||
titleLabel.setStyle("-fx-font-size: 16px; -fx-font-weight: bold;");
|
titleLabel.setStyle("-fx-font-size: 16px; -fx-font-weight: bold;");
|
||||||
|
|
||||||
Button connectButton = new Button("立即连接");
|
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.setStyle("-fx-background-color: " + buttonColor + "; -fx-text-fill: white; -fx-padding: 10px 20px; -fx-border-radius: 4px;");
|
||||||
|
|
||||||
option.getChildren().addAll(imageView, titleLabel, connectButton);
|
option.getChildren().addAll(imageView, titleLabel, connectButton);
|
||||||
|
|||||||
Reference in New Issue
Block a user