Skip to content

Commit 1d788ba

Browse files
committed
#178: style tableView. tertiary-buttons
1 parent ddf735a commit 1d788ba

File tree

6 files changed

+83
-39
lines changed

6 files changed

+83
-39
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ You should put the .jar in an extra folder as a *logs* and a *db* folder will be
7575
* Windows 7, 10, 11
7676
* Linux (tested on Ubuntu 18.04)
7777
* Mac (tested on MacBook M2 Pro (ARM based CPU))
78-
* Java 17
78+
* Java >= 17

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,15 @@ protected void updateItem(TableRow item, boolean empty) {
346346
copyKeepTimeNotes.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
347347
copyKeepTimeNotes.setTooltip(new Tooltip("Copy notes"));
348348
copyKeepTimeNotes.setOnAction(me -> copyToClipboard(keepTimeNotesLabel.getText()));
349-
349+
copyKeepTimeNotes.getStyleClass().add("tertiary-button");
350350
final Button copyHeimatNotes = new Button("",
351351
SvgNodeProvider.getSvgNodeWithScale(Resources.RESOURCE.SVG_CLIPBOARD_ICON, 0.03, 0.03));
352352
copyHeimatNotes.setMaxSize(20, 18);
353353
copyHeimatNotes.setMinSize(20, 18);
354354
copyHeimatNotes.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
355355
copyHeimatNotes.setTooltip(new Tooltip("Copy notes"));
356356
copyHeimatNotes.setOnAction(me -> copyToClipboard(heimatNotesLabel.getText()));
357+
copyHeimatNotes.getStyleClass().add("tertiary-button");
357358

358359
final Label keeptimeLabel = new Label("KeepTime:");
359360
keeptimeLabel.setMinWidth(60);

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ protected void updateItem(TableRow workItem, boolean empty) {
260260
this.workTableTreeView.getColumns().add(timeSumColumn);
261261

262262
final TreeTableColumn<TableRow, Button> buttonColumn = new TreeTableColumn<>("Controls");
263-
buttonColumn.setCellValueFactory(new TreeItemPropertyValueFactory<TableRow, Button>("buttonBox"));
264-
buttonColumn.setMinWidth(100);
263+
buttonColumn.setCellValueFactory(new TreeItemPropertyValueFactory<>("buttonBox"));
264+
buttonColumn.setMinWidth(95);
265265
buttonColumn.setSortable(false);
266266
buttonColumn.setReorderable(false);
267267
this.workTableTreeView.getColumns().add(buttonColumn);
@@ -392,6 +392,7 @@ private Button createDeleteWorkButton(final Work w) {
392392
deleteButton.setMaxSize(20, 18);
393393
deleteButton.setMinSize(20, 18);
394394
deleteButton.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
395+
deleteButton.getStyleClass().add("tertiary-button");
395396

396397
deleteButton.setOnAction(e -> {
397398
LOG.info("Delete work clicked.");
@@ -419,6 +420,7 @@ private Button createEditWorkButton(final Work work) {
419420
editButton.setMaxSize(20, 18);
420421
editButton.setMinSize(20, 18);
421422
editButton.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
423+
editButton.getStyleClass().add("tertiary-button");
422424

423425
editButton.setOnAction(e -> {
424426
LOG.info("Edit work clicked.");
@@ -481,7 +483,7 @@ private Button createCopyProjectNotesButton(final List<Work> projectWork) {
481483
copyNotesButton.setMinSize(20, 18);
482484
copyNotesButton.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
483485
copyNotesButton.setTooltip(new Tooltip("Copy Project Notes"));
484-
486+
copyNotesButton.getStyleClass().add("tertiary-button");
485487

486488
final EventHandler<ActionEvent> eventListener = actionEvent -> {
487489
LOG.debug("Copy to Clipboard clicked.");
@@ -503,6 +505,7 @@ private Button createCopyProjectNameButton(String projectName) {
503505
copyProjectNameButton.setMinSize(20, 18);
504506
copyProjectNameButton.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
505507
copyProjectNameButton.setTooltip(new Tooltip("Copy Project Name"));
508+
copyProjectNameButton.getStyleClass().add("tertiary-button");
506509

507510
final EventHandler<ActionEvent> eventListener = actionEvent -> {
508511
LOG.debug("Copy to Clipboard clicked.");
@@ -525,6 +528,7 @@ private Node createCopyWorkButton(final Work w) {
525528
copyButton.setMaxSize(20, 18);
526529
copyButton.setMinSize(20, 18);
527530
copyButton.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
531+
copyButton.getStyleClass().add("tertiary-button");
528532

529533
final EventHandler<ActionEvent> eventListener = actionEvent -> {
530534
LOG.debug("Copy to Clipboard clicked.");

src/main/resources/css/dialog.css

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/main/resources/css/dsStyles.css

Lines changed: 72 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,68 @@
11
/* Buttons */
22
.primary-button {
3-
-fx-background-color: #00759e;
3+
-fx-background-color: #00759E;
44
-fx-text-fill: white;
55

66
-fx-background-radius: 5px;
77
-fx-border-radius: 5px;
88
-fx-border-width: 1px;
9-
-fx-border-color: #00759e;
9+
-fx-border-color: #00759E;
1010
}
1111
.secondary-button {
1212
-fx-background-color: transparent;
13-
-fx-text-fill: #00759e;
13+
-fx-text-fill: #00759E;
1414

1515
-fx-background-radius: 5px;
1616
-fx-border-radius: 5px;
1717
-fx-border-width: 1px;
18-
-fx-border-color: #00759e;
18+
-fx-border-color: #00759E;
1919
}
20+
.tertiary-button {
21+
-fx-background-color: transparent;
22+
-fx-text-fill: #00759E;
23+
24+
-fx-background-radius: 5px;
25+
-fx-border-radius: 5px;
26+
-fx-border-width: 0;
27+
}
2028

2129
.primary-button:hover {
2230
-fx-background-color: #00A5E1;
2331
}
32+
.primary-button:pressed {
33+
-fx-background-color: #00759E;
34+
}
2435
.secondary-button:hover {
2536
-fx-background-color: #EFEFEF;
2637
}
38+
.secondary-button:pressed {
39+
-fx-background-color: #00759E;
40+
-fx-text-fill: white;
41+
}
42+
.tertiary-button:hover {
43+
-fx-background-color: #77DDFF;
44+
}
45+
.tertiary-button:pressed {
46+
-fx-background-color: #00759E;
47+
}
2748

2849
/* ColorPicker */
2950
.color-picker {
3051
-fx-background-color: white;
3152
-fx-background-radius: 5px;
32-
-fx-border-color: #00759e;
53+
-fx-border-color: #00759E;
3354
-fx-border-radius: 5px;
3455
}
3556

3657
/* CheckBox */
3758
.check-box .box{
3859
-fx-background-color: white;
3960
-fx-background-radius: 2px;
40-
-fx-border-color: #00759e;
61+
-fx-border-color: #00759E;
4162
-fx-border-radius: 2px;
4263
}
4364
.check-box:selected .box {
44-
-fx-background-color: #00759e;
65+
-fx-background-color: #00759E;
4566
}
4667
.check-box:selected .mark {
4768
-fx-background-color: white;
@@ -55,7 +76,7 @@
5576
.text-area {
5677
-fx-background-radius: 8px;
5778
-fx-border-radius: 8px;
58-
-fx-border-color: #00759e;
79+
-fx-border-color: #00759E;
5980
-fx-border-width: 1px;
6081
}
6182
.text-area .content {
@@ -70,7 +91,7 @@
7091
.text-field {
7192
-fx-background-radius: 8px;
7293
-fx-border-radius: 8px;
73-
-fx-border-color: #00759e;
94+
-fx-border-color: #00759E;
7495
-fx-border-width: 1px;
7596
}
7697
.text-field:focused {
@@ -80,7 +101,7 @@
80101
.spinner {
81102
-fx-background-radius: 8px;
82103
-fx-border-radius: 8px;
83-
-fx-border-color: #00759e;
104+
-fx-border-color: #00759E;
84105
-fx-border-width: 1px;
85106
}
86107
/* > Text-Field (reset default style) */
@@ -106,7 +127,7 @@
106127

107128
/* HyperLink */
108129
.hyperlink {
109-
-fx-text-fill: #00759e;
130+
-fx-text-fill: #00759E;
110131
}
111132
.hyperlink:hover {
112133
-fx-text-fill: #00A5E1;
@@ -115,7 +136,7 @@
115136
/* ComboBox */
116137
.combo-box {
117138
-fx-background-color: white;
118-
-fx-border-color: #00759e;
139+
-fx-border-color: #00759E;
119140
-fx-border-width: 1px;
120141
-fx-border-radius: 5px;
121142
-fx-background-radius: 5px;
@@ -128,9 +149,47 @@
128149
}
129150
.combo-box .list-view {
130151
-fx-background-color: white;
131-
-fx-border-color: #00759e;
152+
-fx-border-color: #00759E;
132153
-fx-border-radius: 5px;
133154
}
134155
.combo-box .list-cell:hover {
135156
-fx-background-color: #00A5E1;
157+
}
158+
/* Table View */
159+
.table-view .column-header {
160+
-fx-background-color: white;
161+
}
162+
.table-view .column-header-background .filler {
163+
-fx-background-color: white;
164+
}
165+
.table-view .column-header {
166+
-fx-border-color: #C6C6C6;
167+
-fx-border-width: 0 1px 1px 0;
168+
-fx-border-style: solid;
169+
}
170+
/* Tree Table View */
171+
.tree-table-view .column-header {
172+
-fx-background-color: white;
173+
}
174+
.tree-table-view .column-header-background .filler {
175+
-fx-background-color: white;
176+
}
177+
.tree-table-view .column-header {
178+
-fx-border-color: #C6C6C6;
179+
-fx-border-width: 0 1px 1px 0;
180+
-fx-border-style: solid;
181+
}
182+
.tree-table-row-cell{
183+
-fx-background-color: white;
184+
-fx-cell-size:20;
185+
-fx-border-width: 0px 1px 1px 0;
186+
-fx-border-color: #C6C6C6;
187+
}
188+
.tree-table-row-cell * {
189+
-fx-alignment:center;
190+
-fx-padding:0px;
191+
-fx-margin:0px
192+
}
193+
.tree-table-row-cell .arrow {
194+
-fx-padding:4px;
136195
}

src/main/resources/layouts/report.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
</padding>
9898
</BorderPane>
9999
<Canvas fx:id="colorTimeLineCanvas" height="7.0" width="499.0" />
100-
<TreeTableView fx:id="workTableTreeView" prefHeight="300.0" prefWidth="500.0" showRoot="false" stylesheets="@../css/dialog.css" />
100+
<TreeTableView fx:id="workTableTreeView" prefHeight="300.0" prefWidth="500.0" showRoot="false" />
101101
</children>
102102
</VBox>
103103
</children>

0 commit comments

Comments
 (0)