Skip to content

Commit 8062049

Browse files
committed
#178: add icon to sync button in report
1 parent dcd2e94 commit 8062049

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import javafx.scene.Scene;
2626
import javafx.scene.image.Image;
2727
import javafx.scene.input.KeyCode;
28+
import javafx.scene.layout.*;
29+
import javafx.scene.shape.SVGPath;
2830
import javafx.stage.Modality;
2931
import org.slf4j.Logger;
3032
import org.slf4j.LoggerFactory;
@@ -55,10 +57,6 @@
5557
import javafx.scene.control.skin.DatePickerSkin;
5658
import javafx.scene.input.Clipboard;
5759
import javafx.scene.input.ClipboardContent;
58-
import javafx.scene.layout.AnchorPane;
59-
import javafx.scene.layout.BorderPane;
60-
import javafx.scene.layout.GridPane;
61-
import javafx.scene.layout.HBox;
6260
import javafx.scene.shape.Circle;
6361
import javafx.stage.Stage;
6462
import javafx.util.Callback;
@@ -140,6 +138,12 @@ private void initialize() {
140138

141139
private void initHeimatIntegration() {
142140
heimatSyncButton.setVisible(model.getHeimatSettings().isHeimatActive());
141+
final SVGPath svgNodeWithScale = SvgNodeProvider.getSvgNodeWithScale(RESOURCE.SVG_ROTATE_ICON, 0.03, 0.03);
142+
heimatSyncButton.setMaxSize(25,25);
143+
heimatSyncButton.setMinSize(25, 25);
144+
heimatSyncButton.setGraphic(svgNodeWithScale);
145+
heimatSyncButton.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
146+
heimatSyncButton.setTooltip(new Tooltip("Synchronize to HEIMAT..."));
143147
heimatSyncButton.setOnAction(ae-> {
144148
try {
145149
showSyncStage();

src/main/resources/layouts/report.fxml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,20 @@
8282
</VBox>
8383
</left>
8484
<VBox.margin>
85-
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
85+
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
8686
</VBox.margin>
87-
<padding>
88-
<Insets bottom="10.0" />
89-
</padding>
9087
</BorderPane>
91-
<HBox prefHeight="26.0" prefWidth="210.0">
92-
<children>
88+
<BorderPane>
89+
<left>
9390
<Button fx:id="expandCollapseButton" mnemonicParsing="false" prefHeight="25.0" prefWidth="80.0" text="Collapse" />
91+
</left>
92+
<right>
9493
<Button fx:id="heimatSyncButton" mnemonicParsing="false" text="Sync2Heimat" />
95-
</children>
96-
<VBox.margin>
97-
<Insets right="10.0" top="10.0" />
98-
</VBox.margin>
99-
</HBox>
94+
</right>
95+
<padding>
96+
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
97+
</padding>
98+
</BorderPane>
10099
<Canvas fx:id="colorTimeLineCanvas" height="7.0" width="499.0" />
101100
<TreeTableView fx:id="workTableTreeView" prefHeight="300.0" prefWidth="500.0" showRoot="false" stylesheets="@../css/dialog.css" />
102101
</children>

0 commit comments

Comments
 (0)