From 050f9c8a6bf309bf8d9b7a89bea3d8847a142710 Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Thu, 14 Dec 2023 20:09:33 -0500 Subject: [PATCH] Added splash screen image and better splash styling. --- design/splash-screen.svg | 59 ++++++++++++++++++ .../StartupSplashScreenController.java | 2 +- .../perfin/view/SplashScreenStage.java | 3 + src/main/resources/images/splash-screen.png | Bin 0 -> 1917 bytes src/main/resources/startup-splash-screen.css | 31 +++++++++ src/main/resources/startup-splash-screen.fxml | 19 +++--- 6 files changed, 103 insertions(+), 11 deletions(-) create mode 100644 design/splash-screen.svg create mode 100644 src/main/resources/images/splash-screen.png create mode 100644 src/main/resources/startup-splash-screen.css 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 0000000000000000000000000000000000000000..3e9c1b83cb788fb07c66e13353b5256d61a51b2d GIT binary patch literal 1917 zcmeHI>sL})6uD1-Ck~hPQk(%`nk~cs$6YCsp0;@Af-vXIH;8y8EkD%^r%k0! zyvg7lZ+R%1ogrzpA3YcyUR~VfN(gwLg9cV}o4<|KO_+hZ+S>GO&zqH5Pnu>J76JWJ zhk9Dw*qJz7ccq80dEJyvyUBIBb(K%K?8`=}wTG#mrZSgig|$l61Ex2}<8H&$3~->3~kg$2ApV z2GvVX$9d(lXl$GJAHGK~X5;ab0BB_|%;=nj4?R_c^3owFh(M5_XuYH23TI)48;0jJ zr}R3IeX*N6PWap)8ru{19oGg&AKwK*)75^^(*YRvQl%M^BXYOW*o@4{V3-nRwGOmy zVY}mS#jzXGUakmSOt`(4D!990m~a^cPZHm6lwkQyMzhQMBLo&PXzUx6lr#MZ4(D`p zCjV_||6WYH6{(l;;czlWSTJNE3_9mDveb3jmdqw0Cr>3}35M%8~ZNs+An z5D5BOE==mvMhFRndQ-Tbm>fG`2Z9lD;&?-wf&@9>JMzq34dO%9n}%sA({Q*E-wL_t ze(+R>ed|H+Te!*S%B5y|Nl;)lhL1>YRb+b=p+M3KqhC$$%l*qR8)ndnFGPXck{~xi zy`Gc_hNIyOD`8#U+5AK2gG98Yv$RjUc6Rm ziRTlDgnFamTBQEBNKuK?`x2}iCih{`#7K+9!xwX`n>S>XapdBVROgZ@AlSY`7Qsx4 z7HeH#xPM3+ZI!>y)|lpEF25Y1j(0bjSNWtkEBzrz@-|lD^sXjPyOnev1q^SkinihB z%!;5Tg!-{N?W}k=KZKDW)ADOJ4g)~#TfaP2ns|sOrEm^%OoBli^oaFZvtPz}Z0VOe z;yVP`3%hdUd6r8ER$}ArMFlLGeE7n!vKZjKkqob5nxfUFk4y8yxpXsW=8Z^4UY*tU{Yt~}rwymOe=F15(d8Nr) zKy}ZGvQ=?P*A}EWLQs>2N3W|5s_fMy>$;AYx*VlY-9fOs!eZ`eNZi+Xe;dEmy|cUZ z*PpTWI9;vV&b1V;;iz5j#U*o#Y~b6J3RW13l_!*bUZat32pROi;X)O)&IQev!}T7W z%Uh1AlS#aEY&PhFlxIbjwJU1#Sc_Y@pFdhLha(Yr=9HRcgfKxoo=L$%_C~Y3nLW%&n|*y`5H*+!8Y-fCk*$&sy`)s3{PJ279+usfSE0 zeV-ihX!H@ro-t#=H90Y>_+F$uuUs+yRm;NRI+mvSn9U!&Tb5E0&3Jg0(S|s-+s9tn z)$2v`2X?0?Z%*pGAJ=n;6+mG>jW49O#jNw H>{I^&Is6ti literal 0 HcmV?d00001 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 @@ - - - - - - - - +
-