diff --git a/design/splash-screen.svg b/design/splash-screen.svg new file mode 100644 index 0000000..f86ba60 --- /dev/null +++ b/design/splash-screen.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + diff --git a/src/main/java/com/andrewlalis/perfin/control/StartupSplashScreenController.java b/src/main/java/com/andrewlalis/perfin/control/StartupSplashScreenController.java index efdc7e8..a998601 100644 --- a/src/main/java/com/andrewlalis/perfin/control/StartupSplashScreenController.java +++ b/src/main/java/com/andrewlalis/perfin/control/StartupSplashScreenController.java @@ -34,7 +34,7 @@ public class StartupSplashScreenController { } printlnLater("Perfin initialized. Starting the app now."); - Thread.sleep(2000); + Thread.sleep(50000); Platform.runLater(() -> getSplashStage().setDone()); } catch (Exception e) { diff --git a/src/main/java/com/andrewlalis/perfin/view/SplashScreenStage.java b/src/main/java/com/andrewlalis/perfin/view/SplashScreenStage.java index 159b0c7..f5fcb90 100644 --- a/src/main/java/com/andrewlalis/perfin/view/SplashScreenStage.java +++ b/src/main/java/com/andrewlalis/perfin/view/SplashScreenStage.java @@ -3,6 +3,9 @@ package com.andrewlalis.perfin.view; import javafx.beans.property.SimpleObjectProperty; import javafx.beans.value.ObservableValue; import javafx.scene.Scene; +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; +import javafx.stage.Modality; import javafx.stage.Stage; import javafx.stage.StageStyle; diff --git a/src/main/resources/images/splash-screen.png b/src/main/resources/images/splash-screen.png new file mode 100644 index 0000000..3e9c1b8 Binary files /dev/null and b/src/main/resources/images/splash-screen.png differ diff --git a/src/main/resources/startup-splash-screen.css b/src/main/resources/startup-splash-screen.css new file mode 100644 index 0000000..39cfecf --- /dev/null +++ b/src/main/resources/startup-splash-screen.css @@ -0,0 +1,31 @@ +#sceneRoot { + -fx-background-image: url("images/splash-screen.png"); + -fx-background-repeat: stretch; + -fx-background-size: 400 200; + -fx-background-color: transparent; + -fx-padding: 10; +} + +#content { + -fx-font-family: monospace; + -fx-font-size: small; + -fx-background-insets: 0; + -fx-background-color: transparent; + -fx-border-style: none; + -fx-border-color: transparent; + -fx-text-fill: white; + -fx-padding: 0; +} + +#content .content { + -fx-background-color: transparent; + -fx-padding: 0; +} + +#content .scroll-pane .viewport { + -fx-background-color: transparent; +} + +#content .scroll-pane .content { + -fx-background-color: transparent; +} diff --git a/src/main/resources/startup-splash-screen.fxml b/src/main/resources/startup-splash-screen.fxml index 0a55d4d..1b66411 100644 --- a/src/main/resources/startup-splash-screen.fxml +++ b/src/main/resources/startup-splash-screen.fxml @@ -1,17 +1,16 @@ - - - - - - - - +
-