Skip to content

Commit 0f318ae

Browse files
committed
changed png Icons to font awsome icons
1 parent 4fa50bf commit 0f318ae

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,18 @@
9393
<version>3.1.1</version>
9494
<type>maven-plugin</type>
9595
</dependency>
96+
97+
<dependency>
98+
<groupId>de.jensd</groupId>
99+
<artifactId>fontawesomefx-commons</artifactId>
100+
<version>8.15</version>
101+
</dependency>
102+
103+
<dependency>
104+
<groupId>de.jensd</groupId>
105+
<artifactId>fontawesomefx-fontawesome</artifactId>
106+
<version>4.7.0-5</version>
107+
</dependency>
96108
</dependencies>
97109

98110
<build>

src/main/java/de/doubleslash/keeptime/Main.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ private void initialiseUI(final Stage primaryStage) throws IOException {
247247

248248
registerMinimizeEventlistener(mainScene, primaryStage);
249249
registerMaximizeEventlistener(mainScene, primaryStage);
250-
// Image(Resources.getResource(RESOURCE.ICON_MAIN).toString())); // TODO use an app icon
251250

252251
primaryStage.setTitle("KeepTime");
253252
primaryStage.setScene(mainScene);

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ public enum RESOURCE {
4040
FXML_ABOUT("/layouts/about.fxml"),
4141
FXML_MANAGE_PROJECT("/layouts/manage-project.fxml"),
4242

43-
// icon
44-
ICON_MAIN("/icons/icon.png"),
45-
4643
;
44+
4745
String resourceLocation;
4846

4947
private RESOURCE(final String resourceLocation) {

src/main/resources/icons/icon.png

-15.5 KB
Binary file not shown.
-3.96 KB
Binary file not shown.
-10.4 KB
Binary file not shown.
-385 Bytes
Binary file not shown.

src/main/resources/layouts/ViewLayout.fxml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
You should have received a copy of the GNU General Public License
1717
along with this program. If not, see <http://www.gnu.org/licenses/>. -->
1818

19+
<?import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView?>
1920
<?import javafx.geometry.Insets?>
2021
<?import javafx.scene.Group?>
2122
<?import javafx.scene.canvas.Canvas?>
@@ -24,15 +25,13 @@
2425
<?import javafx.scene.control.ListView?>
2526
<?import javafx.scene.control.TextArea?>
2627
<?import javafx.scene.control.TextField?>
27-
<?import javafx.scene.image.Image?>
28-
<?import javafx.scene.image.ImageView?>
2928
<?import javafx.scene.layout.BorderPane?>
3029
<?import javafx.scene.layout.HBox?>
3130
<?import javafx.scene.layout.Pane?>
3231
<?import javafx.scene.layout.VBox?>
3332
<?import javafx.scene.text.Font?>
3433

35-
<Pane fx:id="pane" prefHeight="175.0" style="-fx-background-color: rgba(54,143,179,0.01); -fx-background-radius: 10 10 10 10; -fx-border-radius: 10 10 10 10; -fx-border-color: rgba(54,143,179,.0.01);" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.doubleslash.keeptime.view.ViewController">
34+
<Pane fx:id="pane" prefHeight="175.0" style="-fx-background-color: rgba(54,143,179,0.01); -fx-background-radius: 10 10 10 10; -fx-border-radius: 10 10 10 10; -fx-border-color: rgba(54,143,179,.0.01);" xmlns="http://javafx.com/javafx/8.0.202-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.doubleslash.keeptime.view.ViewController">
3635
<children>
3736
<BorderPane fx:id="borderPane" layoutX="5.0" layoutY="-15.0">
3837
<center>
@@ -54,20 +53,12 @@
5453
<children>
5554
<Button fx:id="calendarButton" mnemonicParsing="false" prefHeight="11.0" prefWidth="21.0" stylesheets="@../css/application.css">
5655
<graphic>
57-
<ImageView fitHeight="20.0" fitWidth="20.0" pickOnBounds="true" preserveRatio="true">
58-
<image>
59-
<Image url="@../icons/icon_calendar.png" />
60-
</image>
61-
</ImageView>
56+
<FontAwesomeIconView glyphName="CALENDAR" glyphStyle="fas" size="20" />
6257
</graphic>
6358
</Button>
6459
<Button fx:id="settingsButton" mnemonicParsing="false" prefHeight="25.0" prefWidth="22.0" stylesheets="@../css/application.css">
6560
<graphic>
66-
<ImageView fitHeight="24.0" fitWidth="22.0" pickOnBounds="true" preserveRatio="true">
67-
<image>
68-
<Image url="@../icons/icon_gear.png" />
69-
</image>
70-
</ImageView>
61+
<FontAwesomeIconView glyphName="COG" glyphStyle="fas" size="20" />
7162
</graphic>
7263
</Button>
7364
</children>

0 commit comments

Comments
 (0)