Skip to content

Commit 4332f61

Browse files
committed
#178: adapt more styles
1 parent c001e94 commit 4332f61

15 files changed

+126
-46
lines changed

src/main/java/de/doubleslash/keeptime/common/Resources.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public enum RESOURCE {
8484
ICON_MAIN("/icons/icon.png"),
8585

8686
/** CSS **/
87-
CSS_BUTTONS("/css/buttons.css")
87+
CSS_DS_STYLE("/css/dsStyles.css")
8888
;
8989

9090
String resourceLocation;

src/main/java/de/doubleslash/keeptime/view/ChangeWithTimeDialog.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package de.doubleslash.keeptime.view;
1818

19+
import de.doubleslash.keeptime.common.Resources;
1920
import org.slf4j.Logger;
2021
import org.slf4j.LoggerFactory;
2122

@@ -64,6 +65,10 @@ private void setUpDialog() {
6465
okButton.setDefaultButton(true);
6566
final Button cancelButton = (Button) getDialogPane().lookupButton(ButtonType.CANCEL);
6667
cancelButton.setDefaultButton(false);
68+
okButton.getStyleClass().add("primary-button");
69+
cancelButton.getStyleClass().add("secondary-button");
70+
getDialogPane().getStylesheets().add(Resources.getResource(Resources.RESOURCE.CSS_DS_STYLE).toExternalForm());
71+
6772

6873
final VBox vBox = new VBox();
6974
final Label description = new Label(

src/main/java/de/doubleslash/keeptime/view/ExternalProjectsSyncController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,11 @@ protected List<HeimatController.HeimatErrors> call() {
451451
}
452452

453453
private static void markNodeValidOrNot(final Node textArea, final boolean isValid) {
454-
String borderColor = "lightgreen";
454+
String borderColor = "#74a317";
455455
if (!isValid) {
456-
borderColor = "lightcoral";
456+
borderColor = "#c63329";
457457
}
458-
textArea.setStyle("-fx-border-color: " + borderColor + "; -fx-border-width: 1px; -fx-border-radius: 4px;");
458+
textArea.setStyle("-fx-border-color: " + borderColor + ";");
459459
}
460460

461461
private static boolean areSecondsOfDayValid(final long seconds) {

src/main/java/de/doubleslash/keeptime/view/MapExternalProjectsController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ protected void updateItem(HeimatTask item, boolean empty) {
251251
okButton.getStyleClass().add("primary-button");
252252
Button dialogCancelButton = (Button) dialog.getDialogPane().lookupButton(cancelButtonType);
253253
dialogCancelButton.getStyleClass().add("secondary-button");
254-
dialog.getDialogPane().getStylesheets().add(Resources.getResource(Resources.RESOURCE.CSS_BUTTONS).toExternalForm());
254+
dialog.getDialogPane().getStylesheets().add(Resources.getResource(Resources.RESOURCE.CSS_DS_STYLE).toExternalForm());
255255

256256

257257
listView.getSelectionModel().getSelectedItems().addListener((ListChangeListener<HeimatTask>) change -> {

src/main/java/de/doubleslash/keeptime/view/ProjectsListViewController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ private GridPane setUpEditProjectGridPane(final Project p, final Dialog<Project>
382382

383383
dialog.getDialogPane().lookupButton(ButtonType.OK).getStyleClass().add("primary-button");
384384
dialog.getDialogPane().lookupButton(ButtonType.CANCEL).getStyleClass().add("secondary-button");
385-
dialog.getDialogPane().getStylesheets().add(Resources.getResource(Resources.RESOURCE.CSS_BUTTONS).toExternalForm());
385+
dialog.getDialogPane().getStylesheets().add(Resources.getResource(Resources.RESOURCE.CSS_DS_STYLE).toExternalForm());
386386

387387
return grid;
388388
}

src/main/java/de/doubleslash/keeptime/view/ReportController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ public void updateItem(final LocalDate item, final boolean empty) {
379379
}
380380

381381
};
382-
383382
myDatePicker.setDayCellFactory(dayCellFactory);
384383
final Node popupContent = datePickerSkin.getPopupContent();
385384
this.topBorderPane.setRight(popupContent);

src/main/java/de/doubleslash/keeptime/view/ViewController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ private GridPane setUpAddNewProjectGridPane(final Dialog<Project> dialog) {
504504
dialog.getDialogPane().lookupButton(ButtonType.OK).disableProperty().bind(manageProjectController.formValidProperty().not());
505505
dialog.getDialogPane().lookupButton(ButtonType.OK).getStyleClass().add("primary-button");
506506
dialog.getDialogPane().lookupButton(ButtonType.CANCEL).getStyleClass().add("secondary-button");
507-
dialog.getDialogPane().getStylesheets().add(Resources.getResource(Resources.RESOURCE.CSS_BUTTONS).toExternalForm());
507+
dialog.getDialogPane().getStylesheets().add(Resources.getResource(Resources.RESOURCE.CSS_DS_STYLE).toExternalForm());
508508

509509
dialogResultConverter(dialog, manageProjectController);
510510

src/main/resources/css/buttons.css

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/* Buttons */
2+
.primary-button {
3+
-fx-background-color: #00759e;
4+
-fx-text-fill: white;
5+
6+
-fx-background-radius: 5px;
7+
-fx-border-radius: 5px;
8+
-fx-border-width: 1px;
9+
-fx-border-color: #00759e;
10+
}
11+
.secondary-button {
12+
-fx-background-color: transparent;
13+
-fx-text-fill: #00759e;
14+
15+
-fx-background-radius: 5px;
16+
-fx-border-radius: 5px;
17+
-fx-border-width: 1px;
18+
-fx-border-color: #00759e;
19+
}
20+
21+
.primary-button:hover {
22+
-fx-background-color: #00A5E1;
23+
}
24+
.secondary-button:hover {
25+
-fx-background-color: #EFEFEF;
26+
}
27+
28+
/* ColorPicker */
29+
.color-picker {
30+
-fx-background-color: white;
31+
-fx-background-radius: 5px;
32+
-fx-border-color: #00759e;
33+
-fx-border-radius: 5px;
34+
}
35+
36+
/* CheckBox */
37+
.check-box .box{
38+
-fx-background-color: white;
39+
-fx-background-radius: 2px;
40+
-fx-border-color: #00759e;
41+
-fx-border-radius: 2px;
42+
}
43+
.check-box:selected .box {
44+
-fx-background-color: #00759e;
45+
}
46+
.check-box:selected .mark {
47+
-fx-background-color: white;
48+
}
49+
50+
/* TextArea */
51+
.text-area {
52+
-fx-background-radius: 8px;
53+
-fx-border-radius: 8px;
54+
-fx-border-color: #00759e;
55+
-fx-border-width: 1px;
56+
}
57+
.text-area .content {
58+
-fx-background-radius: 8px;
59+
-fx-border-radius: 8px;
60+
}
61+
.text-area .viewport {
62+
-fx-background-radius: 8px;
63+
-fx-border-radius: 8px;
64+
}
65+
/* TextField */
66+
.text-field {
67+
-fx-background-radius: 8px;
68+
-fx-border-radius: 8px;
69+
-fx-border-color: #00759e;
70+
-fx-border-width: 1px;
71+
}
72+
.text-field:focused {
73+
-fx-border-color: #0056b3;
74+
}
75+
/* Spinner */
76+
.spinner {
77+
-fx-background-radius: 8px;
78+
-fx-border-radius: 8px;
79+
-fx-border-color: #00759e;
80+
-fx-border-width: 1px;
81+
}
82+
/* > Text-Field (reset default style) */
83+
.spinner > .text-field {
84+
-fx-background-radius: 8 0 0 8;
85+
-fx-background-color: white;
86+
-fx-border-width: 0px;
87+
}
88+
.spinner > .increment-arrow-button {
89+
-fx-background-radius: 0 8 0 0;
90+
}
91+
.spinner > .decrement-arrow-button {
92+
-fx-background-radius: 0 0 8 0;
93+
}
94+
/* DatePicker */
95+
/* > Spinner (reset to default style) */
96+
.date-picker-popup .spinner {
97+
-fx-border-color: transparent; /* Remove custom border */
98+
-fx-border-width: 0px;
99+
-fx-border-radius: 0px;
100+
-fx-background-color: transparent;
101+
}
102+
103+
/* HyperLink */
104+
.hyperlink {
105+
-fx-text-fill: #00759e;
106+
}
107+
.hyperlink:hover {
108+
-fx-text-fill: #00A5E1;
109+
}

src/main/resources/css/settingsv2.css

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,3 @@
3636
{
3737
-fx-background-color: #eaeaea;
3838
}
39-
40-
.button:hover{
41-
-fx-border-color: grey;
42-
}
43-
.color-picker{
44-
-fx-background-color: white;
45-
-fx-border-color: lightgrey;
46-
-fx-border-radius: 2 2 2 2;
47-
}
48-
.check-box .box{
49-
-fx-background-color: white;
50-
-fx-border-color: lightgrey;
51-
-fx-border-radius: 2 2 2 2;
52-
}

0 commit comments

Comments
 (0)