diff --git a/src/main/java/com/rohitawate/restaurant/homewindow/HistoryItemController.java b/src/main/java/com/rohitawate/restaurant/homewindow/HistoryItemController.java index f890037..30e16ba 100644 --- a/src/main/java/com/rohitawate/restaurant/homewindow/HistoryItemController.java +++ b/src/main/java/com/rohitawate/restaurant/homewindow/HistoryItemController.java @@ -3,14 +3,16 @@ package com.rohitawate.restaurant.homewindow; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Label; -import javafx.scene.layout.HBox; +import javafx.scene.control.Tooltip; import java.net.URL; import java.util.ResourceBundle; -public class HistoryItemController { +public class HistoryItemController implements Initializable { @FXML private Label requestType, address; + @FXML + private Tooltip tooltip; public void setRequestType(String requestType) { this.requestType.setText(requestType); @@ -27,4 +29,9 @@ public class HistoryItemController { public String getAddress() { return address.getText(); } + + @Override + public void initialize(URL location, ResourceBundle resources) { + tooltip.textProperty().bind(address.textProperty()); + } } diff --git a/src/main/java/com/rohitawate/restaurant/homewindow/HomeWindowController.java b/src/main/java/com/rohitawate/restaurant/homewindow/HomeWindowController.java index eb3b3d0..dcefc98 100644 --- a/src/main/java/com/rohitawate/restaurant/homewindow/HomeWindowController.java +++ b/src/main/java/com/rohitawate/restaurant/homewindow/HomeWindowController.java @@ -17,9 +17,6 @@ package com.rohitawate.restaurant.homewindow; import com.rohitawate.restaurant.models.DashboardState; -import com.rohitawate.restaurant.models.requests.DataDispatchRequest; -import com.rohitawate.restaurant.models.requests.GETRequest; -import com.rohitawate.restaurant.models.requests.RestaurantRequest; import com.rohitawate.restaurant.util.Services; import javafx.application.Platform; import javafx.beans.binding.Bindings; @@ -29,7 +26,6 @@ import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; import javafx.scene.Parent; import javafx.scene.Scene; -import javafx.scene.control.ScrollPane; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.scene.input.KeyCode; @@ -41,7 +37,6 @@ import javafx.scene.layout.VBox; import javafx.stage.Stage; import java.io.*; -import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.List; @@ -80,7 +75,7 @@ public class HomeWindowController implements Initializable { // Loads the history Task> historyLoader = new Task>() { @Override - protected List call() throws Exception { + protected List call() { return Services.historyManager.getHistory(); } }; @@ -188,6 +183,7 @@ public class HomeWindowController implements Initializable { } public void addHistoryItem(DashboardState state) { + historyPromptLayer.setVisible(false); try { FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/homewindow/HistoryItem.fxml")); Parent historyItem = loader.load(); diff --git a/src/main/resources/css/Adreana.css b/src/main/resources/css/Adreana.css index 4d3fca7..f016729 100644 --- a/src/main/resources/css/Adreana.css +++ b/src/main/resources/css/Adreana.css @@ -14,7 +14,7 @@ .combo-box .list-cell { -fx-background-color: #707070; -fx-pref-height: 39px; - -fx-font-size: 18px; + -fx-font-size: 15px; -fx-text-fill: #d4d4d4; -fx-padding: 0 0 0 10px; } @@ -74,14 +74,19 @@ -fx-background-color: black; } +/* Home window tab */ #homeWindowTabPane:top .tab-header-area .headers-region .tab:top .tab-container .tab-close-button { -fx-background-color: white; } -#homeWindowTabPane:top .tab-header-area .headers-region .tab:selected:top { +#homeWindowTabPane:top .tab-header-area .headers-region .tab:hover:top { -fx-background-color: orangered; } +#homeWindowTabPane:top .tab-header-area .headers-region .tab:selected:top { + -fx-background-color: #505050; +} + .tab-pane:top .tab-header-area { -fx-padding: 0; } @@ -96,7 +101,8 @@ #headersBox, .scroll-pane, .scroll-pane .viewport, -.scroll-pane .scroll-bar:vertical { +.scroll-pane .scroll-bar:vertical, +.scroll-pane .scroll-bar:horizontal { -fx-background-color: #3d3d3d; -fx-background-insets: 0px; } @@ -113,17 +119,21 @@ -fx-background-color: #6a6a6a; } -#requestOptionsTab .tab-header-area .headers-region .tab:selected:top { - -fx-background-color: #55a15c; -} - /* Tab titles */ - .tab-pane:top .tab-header-area .headers-region .tab:top .tab-container .tab-label .text { -fx-fill: white; } -/* Tabs in the request 'Body' option */ +/* Request options (Headers, Authorization, etc) tab */ +#requestOptionsTab .tab-header-area .headers-region .tab:hover:top { + -fx-background-color: #55a15c; +} + +#requestOptionsTab .tab-header-area .headers-region .tab:selected:top { + -fx-background-color: #3d3d3d; +} + +/* Body tab pane */ #bodyTabPane:top .tab-header-area .tab-header-background, #bodyTabPane:top .tab-header-area .headers-region .tab:top { -fx-background-color: #545454; @@ -134,11 +144,15 @@ -fx-background-color: #3d3d3d; } -#bodyTabPane .tab-header-area .headers-region .tab:selected:top { +#bodyTabPane:top .tab-header-area .headers-region .tab:hover:top { -fx-background-color: #4e848f; } -.scroll-pane .scroll-bar:vertical .thumb { +#bodyTabPane:top .tab-header-area .headers-region .tab:selected:top { + -fx-background-color: #3d3d3d; +} + +.scroll-pane .scroll-bar .thumb { -fx-background-color: #808080; } @@ -194,6 +208,10 @@ -fx-background-color: #353535; } +#historyItemBox:hover { + -fx-background-color: #282828; +} + /* SnackBar */ .jfx-snackbar-content { -fx-background-color: black; diff --git a/src/main/resources/fxml/homewindow/HistoryItem.fxml b/src/main/resources/fxml/homewindow/HistoryItem.fxml index 1570e17..cb2ac73 100644 --- a/src/main/resources/fxml/homewindow/HistoryItem.fxml +++ b/src/main/resources/fxml/homewindow/HistoryItem.fxml @@ -2,10 +2,10 @@ + - @@ -21,6 +21,9 @@ + + + diff --git a/src/main/resources/fxml/homewindow/HomeWindow.fxml b/src/main/resources/fxml/homewindow/HomeWindow.fxml index b36a808..483ad49 100644 --- a/src/main/resources/fxml/homewindow/HomeWindow.fxml +++ b/src/main/resources/fxml/homewindow/HomeWindow.fxml @@ -17,18 +17,13 @@ --> - - - - - - - + + - - +