From 31def99398b79c1b1615d2d05fc0f2b19c34cfd9 Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Mon, 8 Apr 2019 12:55:32 +0200 Subject: [PATCH] ADD::added buttons to apply tooltips to for the activities because you can't apply tooltips to imageviews, I added the achievement images to buttons to which you can add tooltips --- .../controller/DashBoardController.java | 18 +++- .../src/main/resources/fxml/dashboard.fxml | 99 ++++++++++++------- .../resources/stylesheets/dashboardStyle.css | 5 + 3 files changed, 80 insertions(+), 42 deletions(-) diff --git a/src/Client/src/main/java/greenify/client/controller/DashBoardController.java b/src/Client/src/main/java/greenify/client/controller/DashBoardController.java index b82e788..463c537 100644 --- a/src/Client/src/main/java/greenify/client/controller/DashBoardController.java +++ b/src/Client/src/main/java/greenify/client/controller/DashBoardController.java @@ -16,10 +16,7 @@ import javafx.scene.Node; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.chart.PieChart; -import javafx.scene.control.Button; -import javafx.scene.control.Label; -import javafx.scene.control.TableColumn; -import javafx.scene.control.TableView; +import javafx.scene.control.*; import javafx.scene.control.cell.PropertyValueFactory; import javafx.scene.image.ImageView; import javafx.scene.layout.AnchorPane; @@ -187,13 +184,24 @@ public class DashBoardController { @FXML private Label loweringTemp; @FXML - private Button refreshHintsButton; + private Button achiev1Tip; + @FXML + private Button achiev2Tip; + @FXML + private Button achiev3Tip; + @FXML + private Button achiev4Tip; + @FXML + private Button achiev5Tip; + @FXML + private Button achiev6Tip; /** * Loads the the necessary things before anything else. * @throws InterruptedException exception if interrupted */ public void initialize() throws InterruptedException { + hintText.setWrapText(true); hintText.setText(hints.randomHint()); //set the dashboardPane to visible diff --git a/src/Client/src/main/resources/fxml/dashboard.fxml b/src/Client/src/main/resources/fxml/dashboard.fxml index a686159..98d7c34 100644 --- a/src/Client/src/main/resources/fxml/dashboard.fxml +++ b/src/Client/src/main/resources/fxml/dashboard.fxml @@ -16,6 +16,7 @@ + @@ -77,7 +78,7 @@ - + @@ -399,7 +400,7 @@ - + diff --git a/src/Client/src/main/resources/stylesheets/dashboardStyle.css b/src/Client/src/main/resources/stylesheets/dashboardStyle.css index a7eefaa..4a74ac6 100644 --- a/src/Client/src/main/resources/stylesheets/dashboardStyle.css +++ b/src/Client/src/main/resources/stylesheets/dashboardStyle.css @@ -81,5 +81,10 @@ -fx-font-size: 14px; } +.toolTipButton { + -fx-background-color: transparent; + -fx-padding: 0 0 0 0; +} +