Skip to content

Commit caa1bd3

Browse files
committed
Merge pull request #483 from ThomasJClark/icon-thing
Fix the "X" button on sources and steps
2 parents c24e0a4 + b50b00a commit caa1bd3

4 files changed

Lines changed: 35 additions & 7 deletions

File tree

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ Button.add-source {
108108

109109
Button.delete, Button.move-left, Button.move-right, .start-stoppable-button, .exception-witness-responder-button {
110110
-fx-padding: 0.2em 0.8em;
111-
-fx-font-weight: bold;
112-
-fx-text-fill: -fx-dark-color;
113111
-fx-pref-height: 2em;
114112
-fx-pref-width: 2em;
115113
}
248 Bytes
Loading

ui/src/main/resources/edu/wpi/grip/ui/pipeline/Step.fxml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3+
<?import edu.wpi.grip.ui.util.DPIUtility?>
34
<?import javafx.scene.control.*?>
5+
<?import javafx.scene.image.Image?>
46
<?import javafx.scene.image.ImageView?>
57
<?import javafx.scene.layout.*?>
6-
<?import edu.wpi.grip.ui.util.DPIUtility ?>
7-
88
<VBox fx:controller="edu.wpi.grip.ui.pipeline.StepController" fx:id="root" xmlns:fx="http://javafx.com/fxml/1"
99
styleClass="step">
1010
<HBox>
11-
<Button fx:id="deleteButton" onMouseClicked="#deleteStep" styleClass="delete" text=""
12-
HBox.hgrow="NEVER">
11+
<Button fx:id="deleteButton" onMouseClicked="#deleteStep" styleClass="delete" HBox.hgrow="NEVER">
12+
<graphic>
13+
<ImageView>
14+
<Image url="/edu/wpi/grip/ui/icons/delete.png"/>
15+
<fitWidth>
16+
<DPIUtility fx:constant="SMALL_ICON_SIZE"/>
17+
</fitWidth>
18+
<fitHeight>
19+
<DPIUtility fx:constant="SMALL_ICON_SIZE"/>
20+
</fitHeight>
21+
</ImageView>
22+
</graphic>
1323
<tooltip>
1424
<Tooltip text="Delete Step"/>
1525
</tooltip>

ui/src/main/resources/edu/wpi/grip/ui/pipeline/source/Source.fxml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3+
<?import edu.wpi.grip.ui.util.DPIUtility?>
34
<?import javafx.scene.control.Button?>
45
<?import javafx.scene.control.Label?>
56
<?import javafx.scene.control.Separator?>
7+
<?import javafx.scene.image.Image?>
8+
<?import javafx.scene.image.ImageView?>
69
<?import javafx.scene.layout.*?>
710
<VBox styleClass="source"
811
fx:controller="edu.wpi.grip.ui.pipeline.source.SourceController"
@@ -12,7 +15,24 @@
1215
<top>
1316
<HBox fx:id="controls" alignment="CENTER" spacing="2.0" styleClass="source-header-box"
1417
BorderPane.alignment="CENTER">
15-
<Button onMouseClicked="#delete" styleClass="delete" text=""/>
18+
<Button onMouseClicked="#delete" styleClass="delete">
19+
<graphic>
20+
<ImageView>
21+
<Image url="/edu/wpi/grip/ui/icons/delete.png"/>
22+
<fitWidth>
23+
<DPIUtility fx:constant="SMALL_ICON_SIZE"/>
24+
</fitWidth>
25+
<fitHeight>
26+
<DPIUtility fx:constant="SMALL_ICON_SIZE"/>
27+
</fitHeight>
28+
</ImageView>
29+
</graphic>
30+
</Button>
31+
<Separator orientation="VERTICAL" visible="false">
32+
<prefWidth>
33+
<DPIUtility fx:constant="MINI_ICON_SIZE"/>
34+
</prefWidth>
35+
</Separator>
1636
<Label fx:id="name" styleClass="source-name"/>
1737
<Pane HBox.hgrow="ALWAYS"/>
1838
</HBox>

0 commit comments

Comments
 (0)