Continue WIP work on darkmode

This commit is contained in:
Marvin Elsen 2024-10-03 16:22:51 +02:00
parent 46af4db9f1
commit d473eafe35
Signed by: marvinelsen
GPG Key ID: 820672408CC318C2
4 changed files with 22 additions and 5 deletions

View File

@ -66,6 +66,7 @@ class WillowApplication : Application() {
val root = fxmlLoader.load(javaClass.getResourceAsStream("/fxml/main.fxml")) as BorderPane val root = fxmlLoader.load(javaClass.getResourceAsStream("/fxml/main.fxml")) as BorderPane
val primaryScene = Scene(root, WINDOW_WIDTH, WINDOW_HEIGHT) val primaryScene = Scene(root, WINDOW_WIDTH, WINDOW_HEIGHT)
// primaryScene.stylesheets.add(javaClass.getResource("/css/dark.css")?.toExternalForm()!!)
primaryStage.apply { primaryStage.apply {
title = WINDOW_TITLE title = WINDOW_TITLE

View File

@ -4,13 +4,19 @@ https://openjfx.io/javadoc/23/javafx.graphics/javafx/scene/doc-files/cssref.html
*/ */
.root { .root {
willow-background: #2D2D30; willow-background: #282828;
willow-foreground: #ffffff; willow-foreground: #dfdfdf;
-fx-base: willow-background;
-fx-background-color: willow-background; -fx-background-color: willow-background;
background-color: willow-background; -fx-text-fill: willow-foreground;
} }
/*.split-pane {
-fx-background-color: willow-background;
}*/
.label { .label {
-fx-text-fill: willow-foreground; -fx-text-fill: willow-foreground;
} }
@ -18,3 +24,13 @@ https://openjfx.io/javadoc/23/javafx.graphics/javafx/scene/doc-files/cssref.html
.radio-button { .radio-button {
-fx-text-fill: willow-foreground; -fx-text-fill: willow-foreground;
} }
.list-cell:even {
-fx-text-fill: willow-foreground;
-fx-background-color: #1e1e1e;
}
.list-cell:odd {
-fx-text-fill: willow-foreground;
-fx-background-color: #292929;
}

View File

@ -7,7 +7,7 @@
<VBox xmlns="http://javafx.com/javafx/23" xmlns:fx="http://javafx.com/fxml/1" <VBox xmlns="http://javafx.com/javafx/23" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.marvinelsen.willow.ui.controllers.DetailsController" fx:controller="com.marvinelsen.willow.ui.controllers.DetailsController"
stylesheets="/css/details.css"> stylesheets="/css/details.css">
<FlowPane fx:id="flowPaneHeader" hgap="8.0" onContextMenuRequested="#headerOnContextMenuRequested" <FlowPane fx:id="flowPaneHeader" styleClass="flow-pane-header" hgap="8.0" onContextMenuRequested="#headerOnContextMenuRequested"
prefHeight="38.0" prefWidth="412.0" rowValignment="BASELINE" vgap="8.0" VBox.vgrow="NEVER"> prefHeight="38.0" prefWidth="412.0" rowValignment="BASELINE" vgap="8.0" VBox.vgrow="NEVER">
<padding> <padding>
<Insets bottom="6.0" left="6.0" right="6.0" top="6.0"/> <Insets bottom="6.0" left="6.0" right="6.0" top="6.0"/>

View File

@ -15,7 +15,7 @@
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0"/> <Insets bottom="8.0" left="8.0" right="8.0" top="8.0"/>
</BorderPane.margin> </BorderPane.margin>
<fx:include source="/fxml/search.fxml"/> <fx:include source="/fxml/search.fxml"/>
<SplitPane dividerPositions="0.33" VBox.vgrow="ALWAYS"> <SplitPane styleClass="split-pane" dividerPositions="0.33" VBox.vgrow="ALWAYS">
<fx:include source="/fxml/search-results.fxml"/> <fx:include source="/fxml/search-results.fxml"/>
<fx:include source="/fxml/details.fxml"/> <fx:include source="/fxml/details.fxml"/>
</SplitPane> </SplitPane>