Skip to content

Commit

Permalink
Tweak GUI to polish interface
Browse files Browse the repository at this point in the history
  • Loading branch information
wrjgold committed Sep 16, 2024
1 parent b6fda71 commit e2ee1fe
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/main/java/tick/gui/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import tick.Tick;
Expand All @@ -15,6 +16,7 @@
public class Main extends Application {

private Tick tick = new Tick();
private Image tickIcon = new Image(this.getClass().getResourceAsStream("/images/Icon.png"));

@Override
public void start(Stage stage) {
Expand All @@ -23,6 +25,8 @@ public void start(Stage stage) {
AnchorPane ap = fxmlLoader.load();
Scene scene = new Scene(ap);
stage.setScene(scene);
stage.setTitle("Tick");
stage.getIcons().add(tickIcon);
stage.setMinHeight(220);
stage.setMinWidth(417);
fxmlLoader.<MainWindow>getController().setTick(tick); // inject the Tick instance
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/css/dialog-box.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.label {
-fx-background-color: linear-gradient(to bottom right, #00ffbf, #00ddff);
-fx-border-color: #d55e00 #009e73 #cc79a7 #0072b2;
-fx-background-color: #c5e7f0;
-fx-border-color: black;
-fx-border-width: 2px;
-fx-background-radius: 1em 1em 0 1em;
-fx-border-radius: 1em 1em 0 1em;
Expand Down
11 changes: 6 additions & 5 deletions src/main/resources/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@
}

.button {
-fx-background-color: mediumspringgreen;
-fx-font: italic bold 16px "Arial";
-fx-background-color: #ffcd00;
-fx-font: italic bold 18px "Arial";
}

.button:hover {
-fx-background-color:cyan;
-fx-font-size: 18px;
-fx-background-color: #ffcd00;
-fx-font-size: 16px;
}

.button:pressed {
-fx-background-color:orange;
-fx-font-size: 20px;
-fx-font-size: 16px;
-fx-effect: innershadow(gaussian, rgba(0,0,0,0.7) , 20,0,0,0 );
}

.scroll-pane {
Expand Down
Binary file added src/main/resources/images/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e2ee1fe

Please sign in to comment.