|
36 | 36 | import de.doubleslash.keeptime.model.Model; |
37 | 37 | import de.doubleslash.keeptime.model.Project; |
38 | 38 | import de.doubleslash.keeptime.view.time.Interval; |
| 39 | +import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView; |
39 | 40 | import javafx.application.Platform; |
40 | 41 | import javafx.beans.binding.Bindings; |
41 | 42 | import javafx.beans.property.BooleanProperty; |
|
61 | 62 | import javafx.scene.control.ListView; |
62 | 63 | import javafx.scene.control.TextArea; |
63 | 64 | import javafx.scene.control.TextField; |
64 | | -import javafx.scene.effect.Light; |
65 | | -import javafx.scene.effect.Lighting; |
66 | 65 | import javafx.scene.image.Image; |
67 | 66 | import javafx.scene.image.ImageView; |
68 | 67 | import javafx.scene.image.WritableImage; |
@@ -126,6 +125,18 @@ public class ViewController { |
126 | 125 | @FXML |
127 | 126 | private Canvas canvas; |
128 | 127 |
|
| 128 | + @FXML |
| 129 | + private FontAwesomeIconView calendarIcon; |
| 130 | + |
| 131 | + @FXML |
| 132 | + private FontAwesomeIconView settingsIcon; |
| 133 | + |
| 134 | + @FXML |
| 135 | + private FontAwesomeIconView minimizeIcon; |
| 136 | + |
| 137 | + @FXML |
| 138 | + private FontAwesomeIconView closeIcon; |
| 139 | + |
129 | 140 | private ColorTimeLine mainColorTimeLine; |
130 | 141 |
|
131 | 142 | private class Delta { |
@@ -188,19 +199,14 @@ private void initialize() { |
188 | 199 |
|
189 | 200 | addNewProjectButton.textFillProperty().bind(fontColorProperty); |
190 | 201 |
|
191 | | - // Add a light to colorize buttons |
192 | | - // TODO is there a nicer way for this? (see #12) |
193 | | - final Lighting lighting = new Lighting(); |
194 | | - lighting.lightProperty().bind(Bindings.createObjectBinding(() -> { |
195 | | - final Color color = fontColorProperty.get(); |
196 | | - return new Light.Distant(45, 45, color); |
197 | | - }, fontColorProperty)); |
198 | | - |
199 | 202 | settingsButton.setOnAction(ae -> settingsClicked()); |
200 | | - settingsButton.setEffect(lighting); |
201 | 203 |
|
202 | 204 | calendarButton.setOnAction(ae -> calendarClicked()); |
203 | | - calendarButton.setEffect(lighting); |
| 205 | + |
| 206 | + calendarIcon.fillProperty().bind(fontColorProperty); |
| 207 | + settingsIcon.fillProperty().bind(fontColorProperty); |
| 208 | + minimizeIcon.fillProperty().bind(fontColorProperty); |
| 209 | + closeIcon.fillProperty().bind(fontColorProperty); |
204 | 210 |
|
205 | 211 | final Runnable updateMainBackgroundColor = this::runUpdateMainBackgroundColor; |
206 | 212 |
|
|
0 commit comments