1
0
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:
Victor 2017-09-04 20:49:19 +03:00
parent 5acaa5ee88
commit dddc678b23
4 changed files with 81 additions and 0 deletions

View File

@ -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) {

View 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;
}

View 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;
}

View 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%);
}