引入亚特兰大fx主题
This commit is contained in:
parent
6bd259992a
commit
7344936d92
6
pom.xml
6
pom.xml
@ -16,6 +16,11 @@
|
|||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.github.mkpaz</groupId>
|
||||||
|
<artifactId>atlantafx-base</artifactId>
|
||||||
|
<version>2.0.1</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.openjfx</groupId>
|
<groupId>org.openjfx</groupId>
|
||||||
<artifactId>javafx-fxml</artifactId>
|
<artifactId>javafx-fxml</artifactId>
|
||||||
@ -31,6 +36,7 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
module org.jcnc.jnotepad {
|
module org.jcnc.jnotepad {
|
||||||
requires javafx.controls;
|
requires javafx.controls;
|
||||||
|
requires atlantafx.base;
|
||||||
|
|
||||||
exports org.jcnc.jnotepad;
|
exports org.jcnc.jnotepad;
|
||||||
exports org.jcnc.jnotepad.tool;
|
exports org.jcnc.jnotepad.tool;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package org.jcnc.jnotepad;
|
package org.jcnc.jnotepad;
|
||||||
|
|
||||||
|
import atlantafx.base.theme.PrimerLight;
|
||||||
import javafx.application.Application;
|
import javafx.application.Application;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
@ -28,6 +29,8 @@ public class LunchApp extends Application {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage primaryStage) {
|
public void start(Stage primaryStage) {
|
||||||
|
|
||||||
|
|
||||||
Pane root = new Pane();
|
Pane root = new Pane();
|
||||||
|
|
||||||
double width = Constants.SCREEN_WIDTH;
|
double width = Constants.SCREEN_WIDTH;
|
||||||
@ -37,6 +40,8 @@ public class LunchApp extends Application {
|
|||||||
|
|
||||||
Scene scene = new Scene(root, width, length);
|
Scene scene = new Scene(root, width, length);
|
||||||
|
|
||||||
|
Application.setUserAgentStylesheet(new PrimerLight().getUserAgentStylesheet());
|
||||||
|
|
||||||
primaryStage.setTitle(name);
|
primaryStage.setTitle(name);
|
||||||
primaryStage.setWidth(width);
|
primaryStage.setWidth(width);
|
||||||
primaryStage.setHeight(length);
|
primaryStage.setHeight(length);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user