1 package de.spiritscorp.datasync.theme;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 import javafx.scene.Scene;
24
25
26
27
28 public class NordicLightTheme implements AppTheme {
29 @Override
30 public void apply( Scene scene ) {
31 scene.getRoot().setStyle( "-fx-font-size: 14; -fx-font-family: 'Comic Sans MS', 'Segoe UI'; -fx-background-color: #f4f6f9;" );
32 final String css = """
33 .list-view { -fx-background-color: #e5e9f0; }
34 .list-cell { -fx-background-color: #e5e9f0; -fx-text-fill: #4c566a; -fx-padding: 12px; -fx-border-color: #d8dee9; -fx-border-width: 0 0 1px 0; }
35 .list-cell:hover { -fx-background-color: #d8dee9; }
36 .list-cell:selected { -fx-background-color: #88c0d0; -fx-text-fill: #2e3440; -fx-font-weight: bold; }
37 .label { -fx-text-fill: #2e44a4 !important; }
38 .button { -fx-background-color: #81a1c1; -fx-text-fill: white; -fx-background-radius: 4px; -fx-cursor: hand;}
39 .button:hover { -fx-background-color: #5e81ac; }
40 .text-field, .combo-box, .text-area { -fx-background-color: #ffffff; -fx-text-fill: #2e3440; -fx-border-color: #d8dee9; -fx-background-radius: 4px; -fx-border-radius: 4px; }
41 .text-field:focused, .combo-box:focused, .text-area:focused { -fx-border-color: #3498db; }
42 .combo-box:hover { -fx-border-color: #95a5a6; }
43 .combo-box .list-cell { -fx-background-color: #ffffff; -fx-text-fill: #2e3440; }
44 .combo-box .list-cell:selected { -fx-background-color: #88c0d0; -fx-text-fill: #2e3440; }
45 .status-success { -fx-text-fill: #22aa22; -fx-font-weight: bold; }
46 .status-error { -fx-text-fill: #ff3333; -fx-font-weight: bold; }
47 .status-warning { -fx-text-fill: #ffaa00; -fx-font-weight: bold; }
48
49
50 .table-view { -fx-background-color: #ffffff; -fx-border-color: #d8dee9; }
51 .table-view .column-header, .table-view .filler { -fx-background-color: #e5e9f0; -fx-border-color: #d8dee9; }
52 .table-view .column-header .label { -fx-text-fill: #4c566a; }
53 .table-row-cell { -fx-background-color: #ffffff; -fx-text-fill: #2e3440; }
54 .table-row-cell:odd { -fx-background-color: #f8fafc; }
55 .table-row-cell:selected { -fx-background-color: #88c0d0; }
56
57 .tab-pane .tab-header-area .tab-header-background { -fx-background-color: #e5e9f0; }
58 .tab { -fx-background-color: #d8dee9; -fx-background-radius: 4px 4px 0 0; }
59 .tab:selected { -fx-background-color: #81a1c1; }
60 .tab:selected .tab-label { -fx-text-fill: #ffffff !important; }
61 .tab .tab-label { -fx-text-fill: #4c566a; }
62
63 .progress-bar .track { -fx-background-color: #e5e9f0; -fx-background-radius: 4px; }
64 .progress-bar .bar { -fx-background-color: #81a1c1; -fx-background-radius: 4px; }
65 .dialog-pane { -fx-background-color: #ffffff; }
66 .check-box .box { -fx-background-color: #ffffff; -fx-border-color: #d8dee9; -fx-background-radius: 3px; }
67 .check-box:selected .mark { -fx-background-color: #81a1c1; }
68 """;
69 scene.getStylesheets().clear();
70 scene.getStylesheets().add( "data:text/css," + css.replace( "\n", "" ).replace( " ", "%20" ) );
71 }
72
73 @Override
74 public String getName() { return "Nordic Light"; }
75
76 @Override
77 public String toString() {
78 return getName();
79 }
80 }