Skip to content

Commit 2e0ab16

Browse files
committed
Fix Windows font bug
1 parent 1e25a05 commit 2e0ab16

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

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

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3+
<?import java.net.URL?>
34
<?import javafx.geometry.Insets?>
5+
<?import javafx.scene.control.Label?>
46
<?import javafx.scene.image.Image?>
57
<?import javafx.scene.image.ImageView?>
68
<?import javafx.scene.layout.HBox?>
@@ -10,9 +12,7 @@
1012
<?import javafx.scene.text.Font?>
1113
<?import javafx.scene.text.Text?>
1214

13-
<VBox fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity"
14-
prefHeight="330.0" prefWidth="600.0" stylesheets="@GRIP.css" xmlns="http://javafx.com/javafx/8.0.65"
15-
xmlns:fx="http://javafx.com/fxml/1" fx:controller="edu.wpi.grip.ui.AboutDialogController">
15+
<VBox fx:id="root" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="330.0" prefWidth="600.0" styleClass="about-window" stylesheets="@GRIP.css" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="edu.wpi.grip.ui.AboutDialogController">
1616
<children>
1717
<Pane VBox.vgrow="ALWAYS" />
1818
<HBox>
@@ -28,24 +28,23 @@
2828
<children>
2929
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="GRIP">
3030
<font>
31-
<Font name="Roboto Bold" size="64.0" />
31+
<Font size="64.0" style="BOLD" />
3232
</font>
3333
</Text>
3434
<Text fx:id="versionNumberText" strokeType="OUTSIDE" strokeWidth="0.0" text="Version 0.0.0">
3535
<font>
36-
<Font name="Roboto Regular" size="14.0" />
36+
<Font size="14.0" />
3737
</font>
3838
</Text>
3939
<Pane VBox.vgrow="ALWAYS" />
4040
<HBox>
4141
<children>
4242
<StackPane onMousePressed="#mousePressedGithubButton" styleClass="about-button">
4343
<children>
44-
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="➔ Github">
44+
<Label text="➔ Github">
4545
<font>
46-
<Font name="Roboto Regular" size="14.0" />
47-
</font>
48-
</Text>
46+
<Font size="14.0" />
47+
</font></Label>
4948
</children>
5049
<opaqueInsets>
5150
<Insets />
@@ -64,11 +63,7 @@
6463
<children>
6564
<StackPane onMousePressed="#mousePressedDocumentationButton" styleClass="about-button">
6665
<children>
67-
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="➔ ScreenSteps Documentation">
68-
<font>
69-
<Font name="Roboto Regular" size="14.0" />
70-
</font>
71-
</Text>
66+
<Label text="➔ ScreenSteps Documentation" />
7267
</children>
7368
<HBox.margin>
7469
<Insets left="-3.0" />
@@ -94,7 +89,7 @@
9489
<Pane HBox.hgrow="ALWAYS" />
9590
<Text fill="#818181" strokeType="OUTSIDE" strokeWidth="0.0" text="GRIP is licensed under a 3 Clause BSD License">
9691
<font>
97-
<Font name="Roboto Regular" size="12.0" />
92+
<Font size="12.0" />
9893
</font></Text>
9994
<Pane HBox.hgrow="ALWAYS" />
10095
</children>
@@ -103,4 +98,8 @@
10398
</padding>
10499
</HBox>
105100
</children>
101+
<stylesheets>
102+
<URL value="@roboto/Roboto.css" />
103+
<URL value="@GRIP.css" />
104+
</stylesheets>
106105
</VBox>

ui/src/main/resources/edu/wpi/grip/ui/GRIP.css

+11-2
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,21 @@ VBox.sockets {
235235
-fx-font-weight: bold;
236236
}
237237

238+
.about-window Text {
239+
-fx-font-family: "Roboto";
240+
}
241+
242+
.about-window Label {
243+
-fx-font-family: "Roboto";
244+
-fx-font-size: 14;
245+
}
246+
238247
.about-button:hover {
239248
-fx-background-color: gray;
240249
-fx-background-radius: 12;
241250
-fx-cursor: hand;
242251
}
243252

244-
.about-button:hover Text {
245-
-fx-fill: white;
253+
.about-button:hover Label {
254+
-fx-text-fill: white;
246255
}

0 commit comments

Comments
 (0)