引入亚特兰大fx主题

This commit is contained in:
许轲 2023-08-15 13:17:26 +08:00
parent 6bd259992a
commit 7344936d92
3 changed files with 12 additions and 0 deletions

View File

@ -16,6 +16,11 @@
<dependencies>
<dependency>
<groupId>io.github.mkpaz</groupId>
<artifactId>atlantafx-base</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
@ -31,6 +36,7 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>

View File

@ -1,5 +1,6 @@
module org.jcnc.jnotepad {
requires javafx.controls;
requires atlantafx.base;
exports org.jcnc.jnotepad;
exports org.jcnc.jnotepad.tool;

View File

@ -1,5 +1,6 @@
package org.jcnc.jnotepad;
import atlantafx.base.theme.PrimerLight;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.Scene;
@ -28,6 +29,8 @@ public class LunchApp extends Application {
@Override
public void start(Stage primaryStage) {
Pane root = new Pane();
double width = Constants.SCREEN_WIDTH;
@ -37,6 +40,8 @@ public class LunchApp extends Application {
Scene scene = new Scene(root, width, length);
Application.setUserAgentStylesheet(new PrimerLight().getUserAgentStylesheet());
primaryStage.setTitle(name);
primaryStage.setWidth(width);
primaryStage.setHeight(length);