mirror of
https://github.com/aNNiMON/HotaruFX.git
synced 2024-09-19 14:14:21 +03:00
Add dark theme
This commit is contained in:
parent
5acaa5ee88
commit
dddc678b23
@ -18,6 +18,11 @@ public class Main extends Application {
|
||||
try {
|
||||
val loader = new FXMLLoader(getClass().getResource("/fxml/Editor.fxml"));
|
||||
val scene = new Scene(loader.load());
|
||||
scene.getStylesheets().addAll(
|
||||
getClass().getResource("/styles/theme-dark.css").toExternalForm(),
|
||||
getClass().getResource("/styles/codearea.css").toExternalForm(),
|
||||
getClass().getResource("/styles/hotarufx-keywords.css").toExternalForm()
|
||||
);
|
||||
controller = loader.getController();
|
||||
primaryStage.setScene(scene);
|
||||
} catch (IOException e) {
|
||||
|
16
app/src/main/resources/styles/codearea.css
Normal file
16
app/src/main/resources/styles/codearea.css
Normal file
@ -0,0 +1,16 @@
|
||||
.styled-text-area {
|
||||
-fx-background-color: #383838;
|
||||
-fx-highlight-fill: #A7A047;
|
||||
}
|
||||
.text {
|
||||
-fx-fill: #dadada;
|
||||
}
|
||||
.caret {
|
||||
-fx-stroke: #F2E52B;
|
||||
}
|
||||
.lineno {
|
||||
-fx-background-color: #2f2f2f;
|
||||
-fx-font-size: 0.8em;
|
||||
-fx-text-fill: #505050;
|
||||
//-fx-opacity: 0.8;
|
||||
}
|
15
app/src/main/resources/styles/hotarufx-keywords.css
Normal file
15
app/src/main/resources/styles/hotarufx-keywords.css
Normal file
@ -0,0 +1,15 @@
|
||||
.keyword {
|
||||
-fx-fill: #A648FF;
|
||||
}
|
||||
.comment {
|
||||
-fx-fill: #969696;
|
||||
}
|
||||
.string {
|
||||
-fx-fill: #F89722;
|
||||
}
|
||||
.number {
|
||||
-fx-fill: #8DB8C7;
|
||||
}
|
||||
.node-function {
|
||||
-fx-fill: #1899C7;
|
||||
}
|
45
app/src/main/resources/styles/theme-dark.css
Normal file
45
app/src/main/resources/styles/theme-dark.css
Normal file
@ -0,0 +1,45 @@
|
||||
.root {
|
||||
-fx-base: #2F2F2F;
|
||||
-fx-background: -fx-base;
|
||||
-fx-accent: #CFC539;
|
||||
|
||||
-fx-color: derive(-fx-base, 10%);
|
||||
|
||||
-fx-control-inner-background: derive(-fx-base, 5%);
|
||||
-fx-control-inner-background-alt: derive(-fx-control-inner-background, 2%);
|
||||
|
||||
-fx-light-text-color: #CCCCCC;
|
||||
-fx-mid-text-color: #505050;
|
||||
-fx-dark-text-color: #050505;
|
||||
-fx-focus-color: -fx-accent;
|
||||
}
|
||||
|
||||
/* Menu */
|
||||
.menu-bar {
|
||||
-fx-background-color: -fx-base;
|
||||
}
|
||||
.menu-bar > .container > .menu-button:hover > .label,
|
||||
.menu-bar > .container > .menu-button:focused > .label,
|
||||
.menu-bar > .container > .menu-button:showing > .label {
|
||||
-fx-text-fill: #FFFFFF;
|
||||
}
|
||||
.menu-item:focused {
|
||||
-fx-background-color: #4E5052;
|
||||
}
|
||||
.menu-item:focused > .label {
|
||||
-fx-text-fill: -fx-light-text-color;
|
||||
}
|
||||
|
||||
/* Scroll-bar */
|
||||
.scroll-bar > .thumb {
|
||||
-fx-color: derive(-fx-accent, -50%);
|
||||
}
|
||||
.scroll-bar > .thumb:hover,
|
||||
.scroll-bar > .increment-button:hover,
|
||||
.scroll-bar > .decrement-button:hover {
|
||||
-fx-color: -fx-accent;
|
||||
}
|
||||
.scroll-bar > .increment-button > .increment-arrow,
|
||||
.scroll-bar > .decrement-button > .decrement-arrow {
|
||||
-fx-background-color: derive(-fx-accent, -20%);
|
||||
}
|
Loading…
Reference in New Issue
Block a user