1 Commits

Author SHA1 Message Date
355c9d3ce4 first try 2021-11-23 06:42:40 +01:00
3 changed files with 38 additions and 0 deletions

View File

@@ -85,6 +85,9 @@ public class SmartCSV extends Application {
private void showUI(Stage primaryStage, String name, String version) { private void showUI(Stage primaryStage, String name, String version) {
SmartCSVController smartCVSController = appContext.getBean(SmartCSVController.class); SmartCSVController smartCVSController = appContext.getBean(SmartCSVController.class);
Scene scene = new Scene((Parent) smartCVSController.getView()); Scene scene = new Scene((Parent) smartCVSController.getView());
var darkThemeCss = scene.getRoot().getStylesheets().get(0);
scene.getRoot().getStylesheets().remove(darkThemeCss);
scene.getRoot().getStylesheets().add(darkThemeCss);
primaryStage.setScene(scene); primaryStage.setScene(scene);
primaryStage.setTitle(String.format("%s %s", name, version)); primaryStage.setTitle(String.format("%s %s", name, version));

View File

@@ -0,0 +1,34 @@
.root {
-fx-base: rgb(39, 40, 40);
-fx-accent: rgb(80, 80, 80);
-fx-default-button: rgb(39, 40, 40);
-fx-focus-color: rgb(80, 80, 80);
-fx-faint-focus-color: #efefef22;
-fx-focused-text-base-color : ladder(
-fx-selection-bar,
-fx-light-text-color 45%,
-fx-dark-text-color 46%,
-fx-dark-text-color 59%,
-fx-mid-text-color 60%
);
-fx-focused-mark-color : -fx-focused-text-base-color ;
-fx-control-inner-background: rgb(39, 40, 40);
-fx-control-inner-background-alt: rgb(20, 20, 20);
}
.table-row-cell:selected {
-fx-background-color: rgb(80, 80, 80);
}
.table-row-cell {
-fx-background-color: #81c483;
}
.text-input:focused {
-fx-highlight-text-fill: ladder(
-fx-highlight-fill,
-fx-light-text-color 45%,
-fx-dark-text-color 46%,
-fx-dark-text-color 59%,
-fx-mid-text-color 60%
);
}

View File

@@ -266,6 +266,7 @@
<left> <left>
</left> </left>
<stylesheets> <stylesheets>
<URL value="@/ninja/javafx/smartcsv/fx/dark-theme.css" />
<URL value="@/ninja/javafx/smartcsv/fx/smartcsv.css" /> <URL value="@/ninja/javafx/smartcsv/fx/smartcsv.css" />
</stylesheets> </stylesheets>
<bottom> <bottom>