From 5cf822a2f5ef0a787b96da5714cf4b13ac05677a Mon Sep 17 00:00:00 2001
From: Robert Goldmann <deadlocker@gmx.de>
Date: Sun, 2 Jul 2017 17:13:18 +0200
Subject: [PATCH] -added button for about dialog -fixed wrong date formatter in
 report tab

---
 src/de/deadlocker8/budgetmaster/ui/Controller.java   |  7 ++++++-
 src/de/deadlocker8/budgetmaster/ui/GUI.fxml          | 12 ++++++++++--
 .../budgetmaster/ui/ReportController.java            |  2 +-
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/de/deadlocker8/budgetmaster/ui/Controller.java b/src/de/deadlocker8/budgetmaster/ui/Controller.java
index 6fb76b59b..c4d84fcb4 100644
--- a/src/de/deadlocker8/budgetmaster/ui/Controller.java
+++ b/src/de/deadlocker8/budgetmaster/ui/Controller.java
@@ -44,6 +44,7 @@ public class Controller
 	@FXML private Button buttonLeft;
 	@FXML private Button buttonRight;
 	@FXML private Button buttonToday;
+	@FXML private Button buttonAbout;
 	@FXML private TabPane tabPane;
 	@FXML private Tab tabHome;
 	@FXML private Tab tabPayments;
@@ -150,6 +151,9 @@ public class Controller
 		FontIcon iconToday = new FontIcon(FontIconType.CALENDAR_ALT);
 		iconToday.setSize(20);
 		buttonToday.setGraphic(iconToday);
+		FontIcon iconAbout = new FontIcon(FontIconType.INFO);
+		iconAbout.setSize(20);
+		buttonAbout.setGraphic(iconAbout);
 
 		// apply theme
 		anchorPaneMain.setStyle("-fx-background-color: #DDDDDD");
@@ -157,7 +161,8 @@ public class Controller
 		labelNotification.setStyle("-fx-text-fill: #FFFFFF; -fx-font-size: 16; -fx-font-weight: bold; -fx-background-color: transparent;");
 		buttonLeft.setStyle("-fx-background-color: transparent;");
 		buttonRight.setStyle("-fx-background-color: transparent;");
-		buttonToday.setStyle("-fx-background-color: transparent;");		
+		buttonToday.setStyle("-fx-background-color: transparent;");
+		buttonAbout.setStyle("-fx-background-color: transparent;");
 		
 		if(!settings.isComplete())
 		{			
diff --git a/src/de/deadlocker8/budgetmaster/ui/GUI.fxml b/src/de/deadlocker8/budgetmaster/ui/GUI.fxml
index 6d80efc5c..1f7694e06 100644
--- a/src/de/deadlocker8/budgetmaster/ui/GUI.fxml
+++ b/src/de/deadlocker8/budgetmaster/ui/GUI.fxml
@@ -7,6 +7,7 @@
 <?import javafx.scene.control.TabPane?>
 <?import javafx.scene.layout.AnchorPane?>
 <?import javafx.scene.layout.HBox?>
+<?import javafx.scene.layout.Region?>
 <?import javafx.scene.layout.StackPane?>
 <?import javafx.scene.layout.VBox?>
 <?import javafx.scene.text.Font?>
@@ -17,6 +18,11 @@
          <children>
             <HBox alignment="CENTER" prefWidth="772.0" spacing="15.0">
                <children>
+                  <Region prefHeight="0.0" prefWidth="200.0" HBox.hgrow="ALWAYS">
+                     <HBox.margin>
+                        <Insets left="25.0" />
+                     </HBox.margin>
+                  </Region>
                   <Button fx:id="buttonLeft" mnemonicParsing="false" onAction="#previousMonth" />
                   <Label fx:id="labelMonth" alignment="CENTER" prefHeight="36.0" prefWidth="196.0" text="Dezember 2016">
                      <font>
@@ -24,9 +30,11 @@
                      </font>
                   </Label>
                   <Button fx:id="buttonRight" mnemonicParsing="false" onAction="#nextMonth" />
-                  <Button fx:id="buttonToday" alignment="CENTER" mnemonicParsing="false" onAction="#today">
+                  <Button fx:id="buttonToday" mnemonicParsing="false" onAction="#today" />
+                  <Region prefHeight="0.0" prefWidth="200.0" HBox.hgrow="ALWAYS" />
+                  <Button fx:id="buttonAbout" alignment="CENTER" mnemonicParsing="false" onAction="#about">
                      <HBox.margin>
-                        <Insets />
+                        <Insets right="10.0" />
                      </HBox.margin>
                   </Button>
                </children>
diff --git a/src/de/deadlocker8/budgetmaster/ui/ReportController.java b/src/de/deadlocker8/budgetmaster/ui/ReportController.java
index 02cb43110..902a7c51c 100644
--- a/src/de/deadlocker8/budgetmaster/ui/ReportController.java
+++ b/src/de/deadlocker8/budgetmaster/ui/ReportController.java
@@ -113,7 +113,7 @@ public class ReportController implements Refreshable
 				String dateString = param.getValue().getDate();
 				try
 				{
-					DateFormat format = new SimpleDateFormat("dd-MM-yyyy");
+					DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
 					Date date = format.parse(dateString);
 					DateFormat finalFormat = new SimpleDateFormat("dd.MM.yy");
 					dateString = finalFormat.format(date);
-- 
GitLab