Skip to content

Commit acd9de9

Browse files
ddamkeddamke
authored andcommitted
add icon for licenses and some text for import/export
1 parent 66cb60e commit acd9de9

File tree

5 files changed

+63
-55
lines changed

5 files changed

+63
-55
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ public enum RESOURCE {
6363

6464
SVG_COLOR_ICON("/svgs/palette.svg"),
6565

66-
SVG_IMPORT_EXPORT_ICON("/svgs/sort.svg")
66+
SVG_IMPORT_EXPORT_ICON("/svgs/sort.svg"),
67+
68+
SVG_LICENSES_ICON("/svgs/closed-captioning.svg")
6769

6870
;
6971

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,11 @@ public class SettingsController {
156156

157157
@FXML
158158
private Region aboutIcon;
159-
@FXML
159+
@FXML
160160
private Region importexportIcon;
161161

162+
@FXML
163+
private Region licensesIcon;
162164

163165
private final ApplicationProperties applicationProperties;
164166

@@ -205,7 +207,7 @@ private void initialize() {
205207
setTabSvg(generalIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_SETTINGS_ICON);
206208
setTabSvg(aboutIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_ABOUT_ICON);
207209
setTabSvg(importexportIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_IMPORT_EXPORT_ICON);
208-
210+
setTabSvg(licensesIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_LICENSES_ICON);
209211

210212
initExportButton();
211213
initImportButton();

src/main/resources/css/settingsv2.css

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,13 @@
2121
-fx-opacity: 0;
2222
-fx-background-color: white;
2323
}
24-
.tab{
25-
-fx-background-insets: 0 1 0 1,0,0;
2624

27-
}
2825
.tab-pane .tab
2926
{
3027
-fx-background-color: white;
3128
-fx-pref-height: 100;
3229
-fx-pref-width: 70;
3330
}
34-
.anchorPane{
35-
-fx-background-color: white;
36-
}
37-
.scroll-pane{
38-
-fx-background-color: white;
39-
}
40-
.scroll-bar:vertical{
41-
-fx-background-color:white;
42-
}
43-
44-
.tab-pane .tab .HBox{
45-
-fx-spacing: 5;
46-
}
47-
4831

4932
.tab-pane:focused > .tab-header-area > .headers-region > .tab:selected .focus-indicator {
5033
-fx-border-width: 1;

src/main/resources/layouts/settings.fxml

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<?import javafx.scene.control.Tab?>
2828
<?import javafx.scene.control.TabPane?>
2929
<?import javafx.scene.control.TableView?>
30+
<?import javafx.scene.control.TextArea?>
3031
<?import javafx.scene.layout.AnchorPane?>
3132
<?import javafx.scene.layout.HBox?>
3233
<?import javafx.scene.layout.Pane?>
@@ -384,21 +385,26 @@
384385
<content>
385386
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="489.0" prefWidth="452.0">
386387
<children>
387-
<VBox layoutX="20.0" layoutY="20.0" prefHeight="328.0" prefWidth="458.0">
388+
<VBox layoutX="20.0" layoutY="20.0" prefHeight="328.0" prefWidth="458.0" spacing="5.0">
388389
<children>
389390
<Group>
390391
<children>
391-
<VBox alignment="BOTTOM_RIGHT" layoutX="30.0" layoutY="81.0" prefHeight="148.0" prefWidth="479.0" styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
392+
<VBox alignment="BOTTOM_RIGHT" layoutX="30.0" layoutY="81.0" prefHeight="184.0" prefWidth="472.0" styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
392393
<children>
393-
<HBox prefHeight="132.0" prefWidth="457.0">
394+
<HBox prefHeight="38.0" prefWidth="470.0">
394395
<children>
395396
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Import">
396397
<font>
397398
<Font name="System Bold" size="12.0" />
398399
</font></Text>
399400
</children>
400401
</HBox>
401-
<HBox alignment="BOTTOM_RIGHT" prefHeight="38.0" prefWidth="432.0">
402+
<HBox prefHeight="88.0" prefWidth="470.0">
403+
<children>
404+
<TextArea editable="false" prefHeight="98.0" prefWidth="470.0" stylesheets="@../css/settingsv2.css" text="Import previously exported .sql file.&#10;This will overwrite the currently used database contents. &#10;You will need to restart the application after this action.&#10;If you proceed you need to select the previouls exported .sql file." />
405+
</children>
406+
</HBox>
407+
<HBox alignment="BOTTOM_RIGHT" prefHeight="44.0" prefWidth="470.0">
402408
<children>
403409
<Button fx:id="importButton" alignment="TOP_LEFT" mnemonicParsing="false" text="Import">
404410
<font>
@@ -413,16 +419,21 @@
413419
</Group>
414420
<Group layoutX="10.0" layoutY="10.0" styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
415421
<children>
416-
<VBox alignment="BOTTOM_RIGHT" prefHeight="144.0" prefWidth="478.0" styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
422+
<VBox alignment="BOTTOM_RIGHT" prefHeight="184.0" prefWidth="472.0" styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
417423
<children>
418-
<HBox prefHeight="105.0" prefWidth="474.0">
424+
<HBox prefHeight="29.0" prefWidth="470.0">
419425
<children>
420426
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Export">
421427
<font>
422428
<Font name="System Bold" size="12.0" />
423429
</font></Text>
424430
</children>
425431
</HBox>
432+
<HBox prefHeight="100.0" prefWidth="200.0">
433+
<children>
434+
<TextArea editable="false" prefHeight="92.0" prefWidth="473.0" text="Export your current Data to an Sql script. &#10;This is needed if you go from the Snapshot-1.2.0-KeepTime version to the recent &#10;release version. " />
435+
</children>
436+
</HBox>
426437
<HBox alignment="BOTTOM_RIGHT" prefHeight="30.0" prefWidth="475.0">
427438
<children>
428439
<Button fx:id="exportButton" mnemonicParsing="false" text="Export">
@@ -437,12 +448,15 @@
437448
</children>
438449
</Group>
439450
</children>
451+
<padding>
452+
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
453+
</padding>
440454
</VBox>
441455
</children>
442456
</AnchorPane>
443457
</content>
444458
<graphic>
445-
<HBox prefHeight="24.0" styleClass="HBox" stylesheets="@../css/settingsv2.css">
459+
<HBox styleClass="HBox" stylesheets="@../css/settingsv2.css">
446460
<children>
447461
<Region fx:id="importexportIcon" prefHeight="25.0" prefWidth="25.0" />
448462
<Label prefWidth="75.0" text="Import/Export" />
@@ -452,7 +466,40 @@
452466
</Tab>
453467
<Tab>
454468
<content>
455-
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="446.0" prefWidth="501.0" styleClass="anchorPane" stylesheets="@../css/settingsv2.css">
469+
<AnchorPane layoutX="20.0" layoutY="20.0" minHeight="0.0" minWidth="0.0" prefHeight="438.0" prefWidth="489.0">
470+
<children>
471+
<VBox layoutX="20.0" layoutY="20.0" prefHeight="387.0" prefWidth="440.0" spacing="5.0">
472+
<children>
473+
<Group />
474+
<VBox prefHeight="305.0" prefWidth="523.0" spacing="5.0" stylesheets="@../css/settingsv2.css">
475+
<children>
476+
<Label fx:id="thirdPartyLabel" text="Third party software">
477+
<font>
478+
<Font name="System Bold" size="12.0" />
479+
</font></Label>
480+
<TableView fx:id="licenseTableView" fixedCellSize="0.0" focusTraversable="false" prefHeight="283.0" prefWidth="421.0" />
481+
</children>
482+
</VBox>
483+
</children>
484+
<padding>
485+
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
486+
</padding>
487+
</VBox>
488+
</children>
489+
</AnchorPane>
490+
</content>
491+
<graphic>
492+
<HBox>
493+
<children>
494+
<Region fx:id="licensesIcon" prefHeight="25.0" prefWidth="25.0" />
495+
<Label prefWidth="75.0" text="Licenses" />
496+
</children>
497+
</HBox>
498+
</graphic>
499+
</Tab>
500+
<Tab>
501+
<content>
502+
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="446.0" prefWidth="501.0" stylesheets="@../css/settingsv2.css">
456503
<children>
457504
<Pane fx:id="mainContainer" layoutX="-20.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="492.0" prefWidth="478.0" styleClass="tab-pane" stylesheets="@../css/settingsv2.css">
458505
<children>
@@ -519,33 +566,6 @@
519566
</HBox>
520567
</graphic>
521568
</Tab>
522-
<Tab>
523-
<content>
524-
<AnchorPane layoutX="20.0" layoutY="20.0" minHeight="0.0" minWidth="0.0" prefHeight="438.0" prefWidth="489.0">
525-
<children>
526-
<VBox layoutX="20.0" layoutY="20.0" prefHeight="387.0" prefWidth="411.0">
527-
<children>
528-
<Group />
529-
<VBox prefHeight="305.0" prefWidth="391.0" spacing="5.0" stylesheets="@../css/settingsv2.css">
530-
<children>
531-
<Label fx:id="thirdPartyLabel" text="Third party software" />
532-
<TableView fx:id="licenseTableView" focusTraversable="false" prefHeight="283.0" prefWidth="391.0" />
533-
</children>
534-
</VBox>
535-
</children>
536-
</VBox>
537-
</children>
538-
</AnchorPane>
539-
</content>
540-
<graphic>
541-
<HBox>
542-
<children>
543-
<Region prefHeight="25.0" prefWidth="25.0" />
544-
<Label prefWidth="75.0" text="Licenses" />
545-
</children>
546-
</HBox>
547-
</graphic>
548-
</Tab>
549569
</tabs>
550570
<styleClass>
551571
<String fx:value="tab-header-area" />
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)