3535import de .doubleslash .keeptime .common .DateFormatter ;
3636import de .doubleslash .keeptime .common .Resources ;
3737import de .doubleslash .keeptime .common .Resources .RESOURCE ;
38+ import de .doubleslash .keeptime .common .SvgNodeProvider ;
3839import de .doubleslash .keeptime .controller .Controller ;
3940import de .doubleslash .keeptime .exceptions .FXMLLoaderException ;
4041import de .doubleslash .keeptime .model .Model ;
4344import de .doubleslash .keeptime .view .worktable .ProjectTableRow ;
4445import de .doubleslash .keeptime .view .worktable .TableRow ;
4546import de .doubleslash .keeptime .view .worktable .WorkTableRow ;
46- import de .jensd .fx .glyphs .fontawesome .FontAwesomeIcon ;
47- import de .jensd .fx .glyphs .fontawesome .FontAwesomeIconView ;
4847import javafx .beans .property .ReadOnlyObjectWrapper ;
4948import javafx .event .ActionEvent ;
5049import javafx .event .EventHandler ;
5655import javafx .scene .control .Alert .AlertType ;
5756import javafx .scene .control .Button ;
5857import javafx .scene .control .ButtonType ;
58+ import javafx .scene .control .ContentDisplay ;
5959import javafx .scene .control .DateCell ;
6060import javafx .scene .control .DatePicker ;
6161import javafx .scene .control .Dialog ;
@@ -200,19 +200,22 @@ private void updateReport(final LocalDate dateToShow) {
200200
201201 this .currentDayLabel .setText (DateFormatter .toDayDateString (this .currentReportDate ));
202202 final List <Work > currentWorkItems = model .getWorkRepository ()
203- .findByStartDateOrderByStartTimeAsc (this .currentReportDate );
203+ .findByStartDateOrderByStartTimeAsc (this .currentReportDate );
204204
205205 colorTimeLine .update (currentWorkItems , controller .calcSeconds (currentWorkItems ));
206206
207- final SortedSet <Project > workedProjectsSet = currentWorkItems .stream ().map (Work ::getProject )
208- .collect (Collectors .toCollection (() -> new TreeSet <>(Comparator .comparing (Project ::getIndex ))));
207+ final SortedSet <Project > workedProjectsSet = currentWorkItems .stream ()
208+ .map (Work ::getProject )
209+ .collect (Collectors .toCollection (() -> new TreeSet <>(
210+ Comparator .comparing (Project ::getIndex ))));
209211
210212 long currentWorkSeconds = 0 ;
211213 long currentSeconds = 0 ;
212214
213215 for (final Project project : workedProjectsSet ) {
214- final List <Work > onlyCurrentProjectWork = currentWorkItems .stream ().filter (w -> w .getProject () == project )
215- .collect (Collectors .toList ());
216+ final List <Work > onlyCurrentProjectWork = currentWorkItems .stream ()
217+ .filter (w -> w .getProject () == project )
218+ .collect (Collectors .toList ());
216219
217220 final long projectWorkSeconds = controller .calcSeconds (onlyCurrentProjectWork );
218221
@@ -282,7 +285,12 @@ public void updateItem(final LocalDate item, final boolean empty) {
282285 }
283286
284287 private Button createDeleteWorkButton (final Work w ) {
285- final Button deleteButton = new Button ("" , new FontAwesomeIconView (FontAwesomeIcon .TRASH ));
288+ final Button deleteButton = new Button ("" ,
289+ SvgNodeProvider .getSvgNodeWithScale (RESOURCE .SVG_TRASH_ICON , 0.03 , 0.03 ));
290+ deleteButton .setMaxSize (20 , 18 );
291+ deleteButton .setMinSize (20 , 18 );
292+ deleteButton .setContentDisplay (ContentDisplay .GRAPHIC_ONLY );
293+
286294 deleteButton .setOnAction (e -> {
287295 LOG .info ("Delete work clicked." );
288296 final Alert alert = new Alert (AlertType .CONFIRMATION );
@@ -304,7 +312,12 @@ private Button createDeleteWorkButton(final Work w) {
304312 }
305313
306314 private Button createEditWorkButton (final Work work ) {
307- final Button editButton = new Button ("" , new FontAwesomeIconView (FontAwesomeIcon .PENCIL ));
315+ final Button editButton = new Button ("" ,
316+ SvgNodeProvider .getSvgNodeWithScale (RESOURCE .SVG_PENCIL_ICON , 0.03 , 0.03 ));
317+ editButton .setMaxSize (20 , 18 );
318+ editButton .setMinSize (20 , 18 );
319+ editButton .setContentDisplay (ContentDisplay .GRAPHIC_ONLY );
320+
308321 editButton .setOnAction (e -> {
309322 LOG .info ("Edit work clicked." );
310323 final Dialog <Work > dialog = setupEditWorkDialog (work );
@@ -361,7 +374,11 @@ private GridPane setUpEditWorkGridPane(final Work work, final Dialog<Work> dialo
361374 }
362375
363376 private Button createCopyProjectButton (final List <Work > projectWork ) {
364- final Button copyButton = new Button ("" , new FontAwesomeIconView (FontAwesomeIcon .CLIPBOARD ));
377+ final Button copyButton = new Button ("" , SvgNodeProvider .getSvgNodeWithScale (RESOURCE .SVG_CLIPBOARD , 0.03 , 0.03 ));
378+ copyButton .setMaxSize (20 , 18 );
379+ copyButton .setMinSize (20 , 18 );
380+ copyButton .setContentDisplay (ContentDisplay .GRAPHIC_ONLY );
381+
365382 final EventHandler <ActionEvent > eventListener = actionEvent -> {
366383 LOG .debug ("Copy to Clipboard clicked." );
367384 final ProjectReport pr = new ProjectReport (projectWork .size ());
@@ -381,7 +398,11 @@ private Button createCopyProjectButton(final List<Work> projectWork) {
381398 }
382399
383400 private Node createCopyWorkButton (final Work w ) {
384- final Button copyButton = new Button ("" , new FontAwesomeIconView (FontAwesomeIcon .CLIPBOARD ));
401+ final Button copyButton = new Button ("" , SvgNodeProvider .getSvgNodeWithScale (RESOURCE .SVG_CLIPBOARD , 0.03 , 0.03 ));
402+ copyButton .setMaxSize (20 , 18 );
403+ copyButton .setMinSize (20 , 18 );
404+ copyButton .setContentDisplay (ContentDisplay .GRAPHIC_ONLY );
405+
385406 final EventHandler <ActionEvent > eventListener = actionEvent -> {
386407 LOG .debug ("Copy to Clipboard clicked." );
387408 final Clipboard clipboard = Clipboard .getSystemClipboard ();
0 commit comments