From 169b8a83962beeb78bbe65c23f30b51721953aff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jes=C3=BAs=20V=C3=A9lez=20Palacios?= <txpalacios@gmail.com>
Date: Wed, 18 May 2016 13:01:11 +0200
Subject: [PATCH] cleanup

---
 .idea/compiler.xml                            |   2 +-
 .idea/encodings.xml                           |   1 -
 .../Maven__org_vesalainen_gpx_GPX11_1_0_2.xml |  13 -
 .idea/misc.xml                                |  55 +---
 .idea/vcs.xml                                 |   2 +-
 estraba.iml                                   |   1 -
 pom.xml                                       |   5 -
 src/main/java/es/kauron/estraba/App.java      |   2 +
 .../controller/DashboardController.java       |  96 ++++++-
 .../es/kauron/estraba/fxml/Dashboard.fxml     | 253 ++++++++++--------
 .../estraba/img/{climb.png => ascent.png}     | Bin
 .../img/{downclimb.png => descent.png}        | Bin
 src/main/resources/general.properties         |   2 +-
 src/main/resources/general_ca.properties      |   2 +-
 src/main/resources/general_es.properties      |   2 +-
 15 files changed, 243 insertions(+), 193 deletions(-)
 delete mode 100644 .idea/libraries/Maven__org_vesalainen_gpx_GPX11_1_0_2.xml
 rename src/main/resources/es/kauron/estraba/img/{climb.png => ascent.png} (100%)
 rename src/main/resources/es/kauron/estraba/img/{downclimb.png => descent.png} (100%)

diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 74810cf..560e612 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="CompilerConfiguration">
-    <option name="DEFAULT_COMPILER" value="Javac" />
     <resourceExtensions />
     <wildcardResourcePatterns>
       <entry name="!?*.java" />
@@ -12,6 +11,7 @@
       <entry name="!?*.flex" />
       <entry name="!?*.kt" />
       <entry name="!?*.clj" />
+      <entry name="!?*.aj" />
     </wildcardResourcePatterns>
     <annotationProcessing>
       <profile default="true" name="Default" enabled="false">
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index c0bce70..b26911b 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -2,6 +2,5 @@
 <project version="4">
   <component name="Encoding">
     <file url="file://$PROJECT_DIR$" charset="UTF-8" />
-    <file url="PROJECT" charset="UTF-8" />
   </component>
 </project>
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_vesalainen_gpx_GPX11_1_0_2.xml b/.idea/libraries/Maven__org_vesalainen_gpx_GPX11_1_0_2.xml
deleted file mode 100644
index 76a983e..0000000
--- a/.idea/libraries/Maven__org_vesalainen_gpx_GPX11_1_0_2.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<component name="libraryTable">
-  <library name="Maven: org.vesalainen.gpx:GPX11:1.0.2">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/vesalainen/gpx/GPX11/1.0.2/GPX11-1.0.2.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/vesalainen/gpx/GPX11/1.0.2/GPX11-1.0.2-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/vesalainen/gpx/GPX11/1.0.2/GPX11-1.0.2-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3d24e68..7999a22 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,46 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="ClientPropertiesManager">
-    <properties class="javax.swing.AbstractButton">
-      <property name="hideActionText" class="java.lang.Boolean" />
-    </properties>
-    <properties class="javax.swing.JComponent">
-      <property name="html.disable" class="java.lang.Boolean" />
-    </properties>
-    <properties class="javax.swing.JEditorPane">
-      <property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" />
-      <property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" />
-      <property name="charset" class="java.lang.String" />
-    </properties>
-    <properties class="javax.swing.JList">
-      <property name="List.isFileList" class="java.lang.Boolean" />
-    </properties>
-    <properties class="javax.swing.JPasswordField">
-      <property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" />
-    </properties>
-    <properties class="javax.swing.JSlider">
-      <property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" />
-      <property name="JSlider.isFilled" class="java.lang.Boolean" />
-    </properties>
-    <properties class="javax.swing.JTable">
-      <property name="Table.isFileList" class="java.lang.Boolean" />
-      <property name="JTable.autoStartsEdit" class="java.lang.Boolean" />
-      <property name="terminateEditOnFocusLost" class="java.lang.Boolean" />
-    </properties>
-    <properties class="javax.swing.JToolBar">
-      <property name="JToolBar.isRollover" class="java.lang.Boolean" />
-    </properties>
-    <properties class="javax.swing.JTree">
-      <property name="JTree.lineStyle" class="java.lang.String" />
-    </properties>
-    <properties class="javax.swing.text.JTextComponent">
-      <property name="caretAspectRatio" class="java.lang.Double" />
-      <property name="caretWidth" class="java.lang.Integer" />
-    </properties>
-  </component>
-  <component name="EntryPointsManager">
-    <entry_points version="2.0" />
-  </component>
   <component name="MavenProjectsManager">
     <option name="originalFiles">
       <list>
@@ -48,17 +7,5 @@
       </list>
     </option>
   </component>
-  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
-    <OptionsSetting value="true" id="Add" />
-    <OptionsSetting value="true" id="Remove" />
-    <OptionsSetting value="true" id="Checkout" />
-    <OptionsSetting value="true" id="Update" />
-    <OptionsSetting value="true" id="Status" />
-    <OptionsSetting value="true" id="Edit" />
-    <ConfirmationsSetting value="0" id="Add" />
-    <ConfirmationsSetting value="0" id="Remove" />
-  </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/out" />
-  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" assert-keyword="false" jdk-15="false" />
 </project>
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 35eb1dd..94a25f7 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
   </component>
 </project>
\ No newline at end of file
diff --git a/estraba.iml b/estraba.iml
index 4bfb802..ec727d4 100644
--- a/estraba.iml
+++ b/estraba.iml
@@ -21,7 +21,6 @@
     <orderEntry type="library" name="Maven: org.jfxtras:jfxtras-common:8.0-r4" level="project" />
     <orderEntry type="library" name="Maven: org.jfxtras:jfxtras-controls:8.0-r4" level="project" />
     <orderEntry type="library" name="Maven: org.jfxtras:jfxtras-fxml:8.0-r4" level="project" />
-    <orderEntry type="library" name="Maven: org.jfxtras:jfxtras-roboto:8.0-r4" level="project" />
     <orderEntry type="library" name="Maven: com.jfoenix:jfoenix:0.0.0-SNAPSHOT" level="project" />
   </component>
 </module>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 95fd914..da4371a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,11 +93,6 @@
             <artifactId>jfxtras-fxml</artifactId>
             <version>8.0-r4</version>
         </dependency>
-        <dependency>
-            <groupId>org.jfxtras</groupId>
-            <artifactId>jfxtras-roboto</artifactId>
-            <version>8.0-r4</version>
-        </dependency>
         <dependency>
             <groupId>com.jfoenix</groupId>
             <artifactId>jfoenix</artifactId>
diff --git a/src/main/java/es/kauron/estraba/App.java b/src/main/java/es/kauron/estraba/App.java
index 8a2461c..d8d4243 100644
--- a/src/main/java/es/kauron/estraba/App.java
+++ b/src/main/java/es/kauron/estraba/App.java
@@ -24,6 +24,7 @@
 
 package es.kauron.estraba;
 
+import es.kauron.estraba.controller.DashboardController;
 import javafx.application.Application;
 import javafx.fxml.FXMLLoader;
 import javafx.scene.Parent;
@@ -56,5 +57,6 @@ public class App extends Application {
         stage.setScene(new Scene(root));
         stage.setResizable(true);
         stage.show();
+        loader.<DashboardController>getController().postinit();
     }
 }
diff --git a/src/main/java/es/kauron/estraba/controller/DashboardController.java b/src/main/java/es/kauron/estraba/controller/DashboardController.java
index 3c08db8..336475d 100644
--- a/src/main/java/es/kauron/estraba/controller/DashboardController.java
+++ b/src/main/java/es/kauron/estraba/controller/DashboardController.java
@@ -2,18 +2,34 @@ package es.kauron.estraba.controller;
 
 import com.jfoenix.controls.JFXButton;
 import com.jfoenix.controls.JFXListView;
-import com.jfoenix.controls.JFXTabPane;
+import com.jfoenix.controls.JFXSnackbar;
 import com.lynden.gmapsfx.GoogleMapView;
+import com.lynden.gmapsfx.javascript.object.GoogleMap;
 import es.kauron.estraba.App;
+import javafx.collections.ObservableList;
 import javafx.event.ActionEvent;
 import javafx.fxml.FXML;
 import javafx.fxml.Initializable;
 import javafx.scene.chart.AreaChart;
 import javafx.scene.chart.LineChart;
+import javafx.scene.chart.PieChart;
+import javafx.scene.control.Label;
 import javafx.scene.control.Tab;
 import javafx.scene.image.Image;
 import javafx.scene.image.ImageView;
+import javafx.scene.layout.AnchorPane;
+import javafx.stage.FileChooser;
+import jgpx.model.analysis.Chunk;
+import jgpx.model.analysis.TrackData;
+import jgpx.model.gpx.Track;
+import jgpx.model.jaxb.GpxType;
+import jgpx.model.jaxb.TrackPointExtensionT;
 
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import java.io.File;
 import java.net.URL;
 import java.util.ResourceBundle;
 
@@ -25,11 +41,23 @@ import java.util.ResourceBundle;
 public class DashboardController implements Initializable {
 
     @FXML
-    private JFXTabPane root;
+    private AnchorPane root;
 
     @FXML
     private Tab tabDashboard;
 
+    @FXML
+    private JFXListView<?> listLeft;
+
+    @FXML
+    private PieChart zoneChart;
+
+    @FXML
+    private JFXListView<?> listRight;
+
+    @FXML
+    private Label motivationLabel;
+
     @FXML
     private Tab tabMap;
 
@@ -55,31 +83,87 @@ public class DashboardController implements Initializable {
     private Tab tabGraph;
 
     @FXML
-    private AreaChart<Double, Double> elevationChart;
+    private AreaChart<Number, Number> elevationChart;
 
     @FXML
-    private LineChart<Double, Double> speedChart;
+    private LineChart<Number, Number> speedChart;
 
     @FXML
-    private LineChart<Double, Double> hrChart;
+    private LineChart<Number, Number> hrChart;
 
     @FXML
-    private LineChart<Double, Double> cadenceChart;
+    private LineChart<Number, Number> cadenceChart;
 
     @FXML
     private Tab tabSettings;
 
+    private GoogleMap map;
+    private TrackData trackData;
+    private JFXSnackbar snackbar;
+
     @Override
     public void initialize(URL location, ResourceBundle resources) {
         ((ImageView)elevationButton.getGraphic()).setImage(new Image(App.class.getResourceAsStream("img/elevation.png")));
         ((ImageView)speedButton.getGraphic()).setImage(new Image(App.class.getResourceAsStream("img/speed.png")));
         ((ImageView)hrButton.getGraphic()).setImage(new Image(App.class.getResourceAsStream("img/hr.png")));
         ((ImageView)cadenceButton.getGraphic()).setImage(new Image(App.class.getResourceAsStream("img/cadence.png")));
+
+
+        trackData.getStartTime();
+        trackData.getTotalDuration();
+        trackData.getMovingTime();
+        trackData.getTotalDistance();
+        trackData.getTotalAscent();
+        trackData.getTotalDescend();
+        trackData.getMaxSpeed();
+        trackData.getAverageSpeed();
+        trackData.getMaxHeartrate();
+        trackData.getMinHeartRate();
+        trackData.getAverageHeartrate();
+        trackData.getMaxCadence();
+        trackData.getAverageCadence();
+
+        // populate charts
+        ObservableList<Chunk> chunks = trackData.getChunks();
+        double lastDistance = Double.MIN_VALUE;
+        for (Chunk chunk : chunks) {
+            //elevationChart (range min-max+10)
+            //speedChart (range 0-max+10)
+            //hrChart (range 30-200)
+            //cadenceChart (range 0-200 (rollapalluza))
+        }
+
     }
 
     @FXML
     private void onMapButton(ActionEvent event){
         System.out.println(((JFXButton)event.getSource()).getId());
     }
+
+    public void postinit() {
+        snackbar = new JFXSnackbar();
+        snackbar.registerSnackbarContainer(root);
+    }
+
+    @FXML
+    private void load(ActionEvent event) throws JAXBException {
+        FileChooser fileChooser = new FileChooser();
+        File file = fileChooser.showOpenDialog(root.getScene().getWindow());
+        if (file == null) return;
+
+        String name = file.getName();
+        JAXBContext jaxbContext = JAXBContext.newInstance(GpxType.class, TrackPointExtensionT.class);
+        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+        JAXBElement<Object> jaxbElement = (JAXBElement<Object>) unmarshaller.unmarshal(file);
+        GpxType gpx = (GpxType) jaxbElement.getValue();
+
+        if (gpx != null) {
+            trackData = new TrackData(new Track(gpx.getTrk().get(0)));
+            snackbar.show("GPX file: " + name + "successfully loaded", 3000);
+        } else {
+            snackbar.show("Error loading GPX file: " + name, 3000);
+        }
+    }
+
 }
 
diff --git a/src/main/resources/es/kauron/estraba/fxml/Dashboard.fxml b/src/main/resources/es/kauron/estraba/fxml/Dashboard.fxml
index 9698d01..e903d24 100644
--- a/src/main/resources/es/kauron/estraba/fxml/Dashboard.fxml
+++ b/src/main/resources/es/kauron/estraba/fxml/Dashboard.fxml
@@ -9,6 +9,7 @@
 <?import javafx.scene.chart.CategoryAxis?>
 <?import javafx.scene.chart.LineChart?>
 <?import javafx.scene.chart.NumberAxis?>
+<?import javafx.scene.chart.PieChart?>
 <?import javafx.scene.control.Label?>
 <?import javafx.scene.control.Tab?>
 <?import javafx.scene.image.ImageView?>
@@ -17,65 +18,122 @@
 <?import javafx.scene.layout.VBox?>
 <?import javafx.scene.text.Font?>
 
-<JFXTabPane fx:id="root" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8.0.76-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="es.kauron.estraba.controller.DashboardController">
-   <tabs>
-      <Tab fx:id="tabDashboard" text="%tab.dashboard">
-         <content>
-            <AnchorPane>
-               <children>
-                  <Label alignment="CENTER" text="%label.welcome" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
-                     <font>
-                        <Font name="Roboto" size="50.0" />
-                     </font>
-                  </Label>
-               </children></AnchorPane>
-         </content>
-      </Tab>
-      <Tab fx:id="tabMap" text="%tab.map">
-         <content>
-            <VBox>
-               <children>
-                  <HBox VBox.vgrow="ALWAYS">
+<AnchorPane fx:id="root" xmlns="http://javafx.com/javafx/8.0.76-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="es.kauron.estraba.controller.DashboardController">
+   <children>
+      <JFXTabPane minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="800.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
+         <tabs>
+            <Tab fx:id="tabDashboard" text="%tab.dashboard">
+               <content>
+                  <VBox prefHeight="200.0" prefWidth="100.0">
                      <children>
-                        <GoogleMapView fx:id="mapView" HBox.hgrow="ALWAYS" />
-                        <JFXListView fx:id="mapSummary" minWidth="100.0" />
-                     </children>
-                  </HBox>
-                  <HBox minHeight="128.0" prefHeight="0.0">
-                     <children>
-                        <VBox prefHeight="128.0" prefWidth="100.0" HBox.hgrow="ALWAYS">
+                        <HBox prefHeight="100.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
                            <children>
-                              <JFXButton fx:id="elevationButton" minHeight="32.0" minWidth="32.0" onAction="#onMapButton">
-                                 <graphic>
-                                    <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
-                                 </graphic>
-                                 <VBox.margin>
-                                    <Insets />
-                                 </VBox.margin></JFXButton>
-                              <JFXButton fx:id="speedButton" layoutX="10.0" layoutY="10.0" minHeight="32.0" minWidth="32.0" onAction="#onMapButton">
-                                 <graphic>
-                                    <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
-                                 </graphic>
-                                 <VBox.margin>
-                                    <Insets />
-                                 </VBox.margin></JFXButton>
-                              <JFXButton fx:id="hrButton" layoutX="10.0" layoutY="10.0" minHeight="32.0" minWidth="32.0" onAction="#onMapButton">
-                                 <graphic>
-                                    <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
-                                 </graphic>
-                                 <VBox.margin>
-                                    <Insets />
-                                 </VBox.margin></JFXButton>
-                              <JFXButton fx:id="cadenceButton" layoutX="10.0" layoutY="42.0" minHeight="32.0" minWidth="32.0" onAction="#onMapButton">
-                                 <graphic>
-                                    <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
-                                 </graphic>
-                                 <VBox.margin>
-                                    <Insets />
-                                 </VBox.margin></JFXButton>
+                              <VBox minHeight="375.0" minWidth="180.0">
+                                 <children>
+                                    <HBox prefHeight="75.0" prefWidth="180.0" />
+                                    <HBox layoutX="10.0" layoutY="10.0" prefHeight="75.0" prefWidth="180.0" />
+                                    <HBox layoutX="10.0" layoutY="10.0" prefHeight="75.0" prefWidth="180.0" />
+                                    <HBox layoutX="10.0" layoutY="110.0" prefHeight="75.0" prefWidth="180.0" />
+                                    <HBox layoutX="10.0" layoutY="102.0" prefHeight="75.0" prefWidth="180.0" />
+                                 </children>
+                              </VBox>
+                              <PieChart fx:id="zoneChart" legendVisible="false" minHeight="375.0" minWidth="0.0" HBox.hgrow="ALWAYS" />
+                              <VBox layoutX="10.0" layoutY="10.0" minHeight="375.0" minWidth="180.0" />
                            </children>
-                        </VBox>
-                        <LineChart minHeight="100.0" prefWidth="9999.0">
+                        </HBox>
+                        <Label fx:id="motivationLabel" alignment="CENTER" focusTraversable="false" maxWidth="1.7976931348623157E308" text="%label.motivation">
+                           <font>
+                              <Font name="Roboto" size="56.0" />
+                           </font>
+                           <VBox.margin>
+                              <Insets bottom="60.0" top="55.0" />
+                           </VBox.margin>
+                        </Label>
+                     </children>
+                     <padding>
+                        <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                     </padding>
+                  </VBox>
+               </content>
+            </Tab>
+            <Tab fx:id="tabMap" text="%tab.map">
+               <content>
+                  <VBox>
+                     <children>
+                        <HBox VBox.vgrow="ALWAYS">
+                           <children>
+                              <GoogleMapView fx:id="mapView" HBox.hgrow="ALWAYS" />
+                              <JFXListView fx:id="mapSummary" minWidth="180.0" />
+                           </children>
+                        </HBox>
+                        <HBox minHeight="128.0" prefHeight="0.0">
+                           <children>
+                              <VBox prefHeight="128.0" prefWidth="100.0" HBox.hgrow="ALWAYS">
+                                 <children>
+                                    <JFXButton fx:id="elevationButton" minHeight="32.0" minWidth="32.0" onAction="#onMapButton">
+                                       <graphic>
+                                          <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
+                                       </graphic>
+                                       <VBox.margin>
+                                          <Insets />
+                                       </VBox.margin>
+                                    </JFXButton>
+                                    <JFXButton fx:id="speedButton" layoutX="10.0" layoutY="10.0" minHeight="32.0" minWidth="32.0" onAction="#onMapButton">
+                                       <graphic>
+                                          <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
+                                       </graphic>
+                                       <VBox.margin>
+                                          <Insets />
+                                       </VBox.margin>
+                                    </JFXButton>
+                                    <JFXButton fx:id="hrButton" layoutX="10.0" layoutY="10.0" minHeight="32.0" minWidth="32.0" onAction="#onMapButton">
+                                       <graphic>
+                                          <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
+                                       </graphic>
+                                       <VBox.margin>
+                                          <Insets />
+                                       </VBox.margin>
+                                    </JFXButton>
+                                    <JFXButton fx:id="cadenceButton" layoutX="10.0" layoutY="42.0" minHeight="32.0" minWidth="32.0" onAction="#onMapButton">
+                                       <graphic>
+                                          <ImageView fitHeight="32.0" fitWidth="32.0" pickOnBounds="true" preserveRatio="true" />
+                                       </graphic>
+                                       <VBox.margin>
+                                          <Insets />
+                                       </VBox.margin>
+                                    </JFXButton>
+                                 </children>
+                              </VBox>
+                              <LineChart minHeight="100.0" prefWidth="9999.0">
+                                <xAxis>
+                                  <CategoryAxis side="BOTTOM" />
+                                </xAxis>
+                                <yAxis>
+                                  <NumberAxis side="LEFT" />
+                                </yAxis>
+                              </LineChart>
+                           </children>
+                        </HBox>
+                     </children>
+                     <padding>
+                        <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                     </padding>
+                  </VBox>
+               </content>
+            </Tab>
+            <Tab fx:id="tabGraph" text="%tab.graph">
+               <content>
+                  <VBox>
+                     <children>
+                        <AreaChart fx:id="elevationChart" minHeight="100.0">
+                          <xAxis>
+                            <CategoryAxis side="BOTTOM" />
+                          </xAxis>
+                          <yAxis>
+                            <NumberAxis side="LEFT" />
+                          </yAxis>
+                        </AreaChart>
+                        <LineChart fx:id="speedChart" minHeight="100.0">
                           <xAxis>
                             <CategoryAxis side="BOTTOM" />
                           </xAxis>
@@ -83,56 +141,35 @@
                             <NumberAxis side="LEFT" />
                           </yAxis>
                         </LineChart>
+                        <LineChart fx:id="hrChart" minHeight="100.0">
+                           <xAxis>
+                              <CategoryAxis side="BOTTOM" />
+                           </xAxis>
+                           <yAxis>
+                              <NumberAxis side="LEFT" />
+                           </yAxis>
+                        </LineChart>
+                        <LineChart fx:id="cadenceChart" minHeight="100.0">
+                           <xAxis>
+                              <CategoryAxis side="BOTTOM" />
+                           </xAxis>
+                           <yAxis>
+                              <NumberAxis side="LEFT" />
+                           </yAxis>
+                        </LineChart>
                      </children>
-                  </HBox>
-               </children>
-            </VBox>
-         </content>
-      </Tab>
-      <Tab fx:id="tabGraph" text="%tab.graph">
-         <content>
-            <VBox>
-               <children>
-                  <AreaChart fx:id="elevationChart" minHeight="100.0">
-                    <xAxis>
-                      <CategoryAxis side="BOTTOM" />
-                    </xAxis>
-                    <yAxis>
-                      <NumberAxis side="LEFT" />
-                    </yAxis>
-                  </AreaChart>
-                  <LineChart fx:id="speedChart" minHeight="100.0">
-                    <xAxis>
-                      <CategoryAxis side="BOTTOM" />
-                    </xAxis>
-                    <yAxis>
-                      <NumberAxis side="LEFT" />
-                    </yAxis>
-                  </LineChart>
-                  <LineChart fx:id="hrChart" minHeight="100.0">
-                     <xAxis>
-                        <CategoryAxis side="BOTTOM" />
-                     </xAxis>
-                     <yAxis>
-                        <NumberAxis side="LEFT" />
-                     </yAxis>
-                  </LineChart>
-                  <LineChart fx:id="cadenceChart" minHeight="100.0">
-                     <xAxis>
-                        <CategoryAxis side="BOTTOM" />
-                     </xAxis>
-                     <yAxis>
-                        <NumberAxis side="LEFT" />
-                     </yAxis>
-                  </LineChart>
-               </children>
-            </VBox>
-         </content>
-      </Tab>
-      <Tab fx:id="tabSettings" text="%tab.settings">
-        <content>
-          <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
-        </content>
-      </Tab>
-   </tabs>
-</JFXTabPane>
+                     <padding>
+                        <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
+                     </padding>
+                  </VBox>
+               </content>
+            </Tab>
+            <Tab fx:id="tabSettings" text="%tab.settings">
+              <content>
+                <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
+              </content>
+            </Tab>
+         </tabs>
+      </JFXTabPane>
+   </children>
+</AnchorPane>
diff --git a/src/main/resources/es/kauron/estraba/img/climb.png b/src/main/resources/es/kauron/estraba/img/ascent.png
similarity index 100%
rename from src/main/resources/es/kauron/estraba/img/climb.png
rename to src/main/resources/es/kauron/estraba/img/ascent.png
diff --git a/src/main/resources/es/kauron/estraba/img/downclimb.png b/src/main/resources/es/kauron/estraba/img/descent.png
similarity index 100%
rename from src/main/resources/es/kauron/estraba/img/downclimb.png
rename to src/main/resources/es/kauron/estraba/img/descent.png
diff --git a/src/main/resources/general.properties b/src/main/resources/general.properties
index 5782bdd..9befe30 100644
--- a/src/main/resources/general.properties
+++ b/src/main/resources/general.properties
@@ -1,4 +1,4 @@
-label.welcome=Welcome!
+label.motivation=Welcome!
 tab.dashboard=Dashboard
 tab.graph=Stats
 tab.map=Your Route
diff --git a/src/main/resources/general_ca.properties b/src/main/resources/general_ca.properties
index 9e731ae..a75e239 100644
--- a/src/main/resources/general_ca.properties
+++ b/src/main/resources/general_ca.properties
@@ -1,4 +1,4 @@
-label.welcome=¡Benvinguts!
+label.motivation=¡Benvinguts!
 tab.dashboard=Sumari
 tab.graph=Estadístiques
 tab.map=La teva ruta
diff --git a/src/main/resources/general_es.properties b/src/main/resources/general_es.properties
index 580a08e..5416bb4 100644
--- a/src/main/resources/general_es.properties
+++ b/src/main/resources/general_es.properties
@@ -1,4 +1,4 @@
-label.welcome=¡Bienvenido!
+label.motivation=¡Bienvenido!
 tab.dashboard=Resúmen
 tab.graph=Estadísticas
 tab.map=Tu ruta