引入亚特兰大fx主题
This commit is contained in:
parent
6bd259992a
commit
7344936d92
6
pom.xml
6
pom.xml
@ -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>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
module org.jcnc.jnotepad {
|
||||
requires javafx.controls;
|
||||
requires atlantafx.base;
|
||||
|
||||
exports org.jcnc.jnotepad;
|
||||
exports org.jcnc.jnotepad.tool;
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user