Skip to content

Commit 662d1fb

Browse files
committed
Change Cursor to Hand while over links
1 parent 3add80e commit 662d1fb

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ui/src/main/java/edu/wpi/grip/ui/AboutDialogController.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package edu.wpi.grip.ui;
22

33
import javafx.fxml.FXML;
4+
import javafx.scene.Cursor;
5+
import javafx.scene.Parent;
46
import javafx.scene.input.MouseEvent;
57
import javafx.scene.paint.Color;
68
import javafx.scene.shape.Rectangle;
@@ -13,6 +15,9 @@ public class AboutDialogController {
1315
@Inject
1416
private Main main;
1517

18+
@FXML
19+
private Parent root;
20+
1621
@FXML
1722
private Text versionNumberText;
1823

@@ -34,24 +39,28 @@ public class AboutDialogController {
3439
void mouseEnteredDocumentationButton(MouseEvent event) {
3540
documentationRectangle.setFill(Color.GRAY);
3641
documentationText.setFill(Color.WHITE);
42+
root.getScene().setCursor(Cursor.HAND);
3743
}
3844

3945
@FXML
4046
void mouseEnteredGithubButton(MouseEvent event) {
4147
githubRectangle.setFill(Color.GRAY);
4248
githubText.setFill(Color.WHITE);
49+
root.getScene().setCursor(Cursor.HAND);
4350
}
4451

4552
@FXML
4653
void mouseExitedDocumentationButton(MouseEvent event) {
4754
documentationRectangle.setFill(CLEAR_COLOR);
4855
documentationText.setFill(Color.BLACK);
56+
root.getScene().setCursor(Cursor.DEFAULT);
4957
}
5058

5159
@FXML
5260
void mouseExitedGithubButton(MouseEvent event) {
5361
githubRectangle.setFill(CLEAR_COLOR);
5462
githubText.setFill(Color.BLACK);
63+
root.getScene().setCursor(Cursor.DEFAULT);
5564
}
5665

5766
@FXML

ui/src/main/resources/edu/wpi/grip/ui/AboutDialog.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<?import javafx.scene.text.Font?>
1212
<?import javafx.scene.text.Text?>
1313

14-
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="330.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="edu.wpi.grip.ui.AboutDialogController">
14+
<VBox fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="330.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="edu.wpi.grip.ui.AboutDialogController">
1515
<children>
1616
<Pane VBox.vgrow="ALWAYS" />
1717
<HBox>

0 commit comments

Comments
 (0)