Skip to content

Commit cc756eb

Browse files
committed
Add headings Text Colours and Background Colours to Font Colors dialogue. Add tooltips to the Background Colours ColorPickers to explain how to access the opacity.
1 parent eb8b79a commit cc756eb

1 file changed

Lines changed: 41 additions & 12 deletions

File tree

src/fjwright/runreduce/FontColorsDialog.fxml

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<?import javafx.geometry.*?>
44
<?import javafx.scene.control.*?>
55
<?import javafx.scene.layout.*?>
6+
<?import javafx.scene.text.*?>
67

78
<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"
89
fx:controller="fjwright.runreduce.FontColorsDialog">
@@ -18,27 +19,55 @@
1819
<RowConstraints/>
1920
<RowConstraints/>
2021
<RowConstraints/>
22+
<RowConstraints/>
23+
<RowConstraints/>
2124
</rowConstraints>
25+
<Label text="Text Colours" GridPane.columnSpan="2147483647" GridPane.halignment="CENTER">
26+
<font>
27+
<Font size="14.0"/>
28+
</font>
29+
<padding>
30+
<Insets bottom="2.0"/>
31+
</padding>
32+
</Label>
2233
<Label fx:id="algebraicInputLabel" style="-fx-background-color: white; -fx-label-padding: 2;"
23-
text="Algebraic Input" GridPane.columnIndex="0" GridPane.rowIndex="0"/>
24-
<ColorPicker fx:id="algebraicInputColorPicker" GridPane.columnIndex="1" GridPane.rowIndex="0"/>
34+
text="Algebraic Input" GridPane.columnIndex="0" GridPane.rowIndex="1"/>
35+
<ColorPicker fx:id="algebraicInputColorPicker" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
2536
<Label fx:id="symbolicInputLabel" style="-fx-background-color: white; -fx-label-padding: 2;"
26-
text="Symbolic Input" GridPane.columnIndex="0" GridPane.rowIndex="1"/>
27-
<ColorPicker fx:id="symbolicInputColorPicker" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
37+
text="Symbolic Input" GridPane.columnIndex="0" GridPane.rowIndex="2"/>
38+
<ColorPicker fx:id="symbolicInputColorPicker" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
2839
<Label fx:id="algebraicOutputLabel" style="-fx-background-color: white; -fx-label-padding: 2;"
29-
text="Algebraic Output" GridPane.columnIndex="0" GridPane.rowIndex="2"/>
30-
<ColorPicker fx:id="algebraicOutputColorPicker" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
40+
text="Algebraic Output" GridPane.columnIndex="0" GridPane.rowIndex="3"/>
41+
<ColorPicker fx:id="algebraicOutputColorPicker" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
3142
<Label fx:id="symbolicOutputLabel" style="-fx-background-color: white; -fx-label-padding: 2;"
32-
text="Symbolic Output" GridPane.columnIndex="0" GridPane.rowIndex="3"/>
33-
<ColorPicker fx:id="symbolicOutputColorPicker" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
43+
text="Symbolic Output" GridPane.columnIndex="0" GridPane.rowIndex="4"/>
44+
<ColorPicker fx:id="symbolicOutputColorPicker" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
45+
<Label text="Background Colours" GridPane.columnSpan="2147483647" GridPane.halignment="CENTER"
46+
GridPane.rowIndex="5">
47+
<font>
48+
<Font size="14.0"/>
49+
</font>
50+
<padding>
51+
<Insets bottom="2.0" top="10.0"/>
52+
</padding>
53+
</Label>
3454
<Label fx:id="warningLabel" style="-fx-label-padding: 2;" text="Warning" GridPane.columnIndex="0"
35-
GridPane.rowIndex="4"/>
55+
GridPane.rowIndex="6"/>
3656
<ColorPicker fx:id="warningColorPicker" onAction="#warningColourAction" GridPane.columnIndex="1"
37-
GridPane.rowIndex="4"/>
57+
GridPane.rowIndex="6">
58+
<tooltip>
59+
<Tooltip fx:id="backgroundTooltip"
60+
text="Background colours are partially transparent by default.&#10;Click on Custom Color... to change the opacity."/>
61+
</tooltip>
62+
</ColorPicker>
3863
<Label fx:id="errorLabel" style="-fx-label-padding: 2;" text="Error" GridPane.columnIndex="0"
39-
GridPane.rowIndex="5"/>
64+
GridPane.rowIndex="7"/>
4065
<ColorPicker fx:id="errorColorPicker" onAction="#errorColourAction" GridPane.columnIndex="1"
41-
GridPane.rowIndex="5"/>
66+
GridPane.rowIndex="7">
67+
<tooltip>
68+
<fx:reference source="backgroundTooltip"/>
69+
</tooltip>
70+
</ColorPicker>
4271
</GridPane>
4372
<HBox alignment="CENTER" spacing="20.0">
4473
<Button mnemonicParsing="false" onAction="#resetDefaultsButtonAction" text="Reset Defaults"/>

0 commit comments

Comments
 (0)