Skip to content

Commit ac9fe44

Browse files
ddamkeddamke
authored andcommitted
Merge branch 'feature/removeFontAwesome2' into feature/#92_word_notes_dialog
2 parents 0bc14f7 + 63a8ddd commit ac9fe44

File tree

5 files changed

+22
-16
lines changed

5 files changed

+22
-16
lines changed

src/main/java/de/doubleslash/keeptime/common/Licenses.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public enum Licenses {
3737

3838
FONTAWESOME("./licenses/Fontawesome Icons — CC BY 4.0 License.txt",
3939
"Fontawesome Icons — CC BY 4.0 License ",
40-
" https://github.com/FortAwesome/Font-Awesome/blob/6.x/LICENSE.txt");
40+
"http://creativecommons.org/licenses/by/4.0/");
4141

4242

4343
private final String path;

src/main/java/de/doubleslash/keeptime/common/SvgNodeProvider.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,31 @@
1313
import java.io.IOException;
1414
import java.io.InputStream;
1515

16+
/**
17+
* class loads SvgPath from a SvgFile because Java can not load the original svg file as it is. <p>
18+
* To load the svg the class extracts the path as string and creates a new SvgPath and returns it.
19+
*/
20+
1621
public class SvgNodeProvider {
1722

1823
private static String getSvgPathWithXMl(Resources.RESOURCE resource) {
1924
String svgPath;
2025
Document document;
2126
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
22-
DocumentBuilder db = null;
23-
27+
DocumentBuilder db;
2428

2529
try {
2630
db = dbf.newDocumentBuilder();
2731
} catch (ParserConfigurationException e) {
28-
throw new RuntimeException(e);
32+
throw new RuntimeException(e + "Tried to build new document");
2933
}
3034

3135
try (InputStream inputStream = Resources.getResource(resource).openStream()) {
3236
document = db.parse(inputStream);
3337
NodeList nodeList = document.getElementsByTagName("path");
3438
svgPath = nodeList.item(0).getAttributes().getNamedItem("d").getNodeValue();
3539
} catch (IOException | SAXException e) {
36-
throw new RuntimeException(e);
40+
throw new RuntimeException(e + " ");
3741
}
3842
return svgPath;
3943
}

src/main/java/de/doubleslash/keeptime/view/ReportController.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,10 @@ public void updateItem(final LocalDate item, final boolean empty) {
270270

271271
private Button createDeleteWorkButton(final Work w) {
272272
final Button deleteButton;
273-
274-
deleteButton = new Button("", SvgNodeProvider.getSvgNode(RESOURCE.SVG_TRASH_ICON));
275-
deleteButton.setMaxSize(20, 18);
276-
deleteButton.setMinSize(20, 18);
277-
deleteButton.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
273+
deleteButton = new Button("", SvgNodeProvider.getSvgNode(RESOURCE.SVG_TRASH_ICON));
274+
deleteButton.setMaxSize(20, 18);
275+
deleteButton.setMinSize(20, 18);
276+
deleteButton.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
278277

279278
deleteButton.setOnAction(e -> {
280279
LOG.info("Delete work clicked.");

src/main/java/de/doubleslash/keeptime/view/ViewController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public ViewController(final Model model, final Controller controller) {
166166
}
167167

168168
@FXML
169-
private void initialize() throws ParserConfigurationException, IOException, SAXException {
169+
private void initialize(){
170170

171171
availableProjectsListView.setFixedCellSize(13);
172172

src/main/resources/layouts/about.fxml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<?import javafx.scene.shape.Line?>
2525
<?import javafx.scene.text.Font?>
2626

27+
<?import javafx.scene.shape.SVGPath?>
2728
<Pane fx:id="mainContainer" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="507.0" prefWidth="509.0" xmlns="http://javafx.com/javafx/8.0.202-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.doubleslash.keeptime.view.AboutController">
2829
<children>
2930
<Label fx:id="keepTimeLabel" layoutX="197.0" layoutY="11.0" text="KeepTime">
@@ -58,11 +59,13 @@
5859
<Font name="Open Sans Regular" size="14.0" />
5960
</font>
6061
</Label>
61-
<Button fx:id="reportBugButton" focusTraversable="false" layoutX="355.0" layoutY="237.0" mnemonicParsing="false" prefHeight="30.0" prefWidth="121.0" text="report a bug">
62-
<font>
63-
<Font name="Open Sans Regular" size="14.0" />
64-
</font>
65-
</Button>
62+
<Button fx:id="reportBugButton" focusTraversable="false" layoutX="396.0" layoutY="237.0" mnemonicParsing="false" prefHeight="30.0" prefWidth="80" text="report" />
63+
<Pane layoutX="280" layoutY="227" maxHeight="50.0" maxWidth="135.0" minHeight="50.0" minWidth="50.0" prefHeight="50.0" prefWidth="135.0">
64+
<children>
65+
<Label contentDisplay="CENTER" layoutY="-5.0" maxHeight="60.0" maxWidth="1.7976931348623157E308" minHeight="50.0" minWidth="50.0" prefHeight="60.0" prefWidth="107.0" text="Found a Bug ?" />
66+
<SVGPath content="M256 0c53 0 96 43 96 96v3.6c0 15.7-12.7 28.4-28.4 28.4H188.4c-15.7 0-28.4-12.7-28.4-28.4V96c0-53 43-96 96-96zM41.4 105.4c12.5-12.5 32.8-12.5 45.3 0l64 64c.7 .7 1.3 1.4 1.9 2.1c14.2-7.3 30.4-11.4 47.5-11.4H312c17.1 0 33.2 4.1 47.5 11.4c.6-.7 1.2-1.4 1.9-2.1l64-64c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-64 64c-.7 .7-1.4 1.3-2.1 1.9c6.2 12 10.1 25.3 11.1 39.5H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H416c0 24.6-5.5 47.8-15.4 68.6c2.2 1.3 4.2 2.9 6 4.8l64 64c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-63.1-63.1c-24.5 21.8-55.8 36.2-90.3 39.6V240c0-8.8-7.2-16-16-16s-16 7.2-16 16V479.2c-34.5-3.4-65.8-17.8-90.3-39.6L86.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l64-64c1.9-1.9 3.9-3.4 6-4.8C101.5 367.8 96 344.6 96 320H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96.3c1.1-14.1 5-27.5 11.1-39.5c-.7-.6-1.4-1.2-2.1-1.9l-64-64c-12.5-12.5-12.5-32.8 0-45.3zM256 0c53 0 96 43 96 96v3.6c0 15.7-12.7 28.4-28.4 28.4H188.4c-15.7 0-28.4-12.7-28.4-28.4V96c0-53 43-96 96-96zM41.4 105.4c12.5-12.5 32.8-12.5 45.3 0l64 64c.7 .7 1.3 1.4 1.9 2.1c14.2-7.3 30.4-11.4 47.5-11.4H312c17.1 0 33.2 4.1 47.5 11.4c.6-.7 1.2-1.4 1.9-2.1l64-64c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3l-64 64c-.7 .7-1.4 1.3-2.1 1.9c6.2 12 10.1 25.3 11.1 39.5H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H416c0 24.6-5.5 47.8-15.4 68.6c2.2 1.3 4.2 2.9 6 4.8l64 64c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-63.1-63.1c-24.5 21.8-55.8 36.2-90.3 39.6V240c0-8.8-7.2-16-16-16s-16 7.2-16 16V479.2c-34.5-3.4-65.8-17.8-90.3-39.6L86.6 502.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l64-64c1.9-1.9 3.9-3.4 6-4.8C101.5 367.8 96 344.6 96 320H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H96.3c1.1-14.1 5-27.5 11.1-39.5c-.7-.6-1.4-1.2-2.1-1.9l-64-64c-12.5-12.5-12.5-32.8 0-45.3z" layoutX="-160.0" layoutY="-231.0" scaleX="0.04" scaleY="0.04" />
67+
</children>
68+
</Pane>
6669
<TableView fx:id="licenseTableView" focusTraversable="false" layoutX="39.0" layoutY="302.0" prefHeight="188.0" prefWidth="437.0" />
6770
<Label fx:id="versionNumberLabel" layoutX="97.0" layoutY="92.0" text="1.0.0">
6871
<font>

0 commit comments

Comments
 (0)