Skip to content

Commit 3920b06

Browse files
committed
#178: add icons for restapi+heimat. move heimat tab up
1 parent 36b5443 commit 3920b06

File tree

5 files changed

+120
-106
lines changed

5 files changed

+120
-106
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ public enum RESOURCE {
7777

7878
SVG_THUMBS_UP_SOLID("/svgs/thumbs-up-solid.svg"),
7979

80+
SVG_GLOBE_ICON("/svgs/globe-solid.svg"),
81+
82+
SVG_ROTATE_ICON("/svgs/rotate-solid.svg"),
83+
8084
ICON_MAIN("/icons/icon.png")
8185

8286
;

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ public class SettingsController {
180180
@FXML
181181
private Region licensesIcon;
182182

183+
@FXML
184+
private Region restAPIIcon;
185+
186+
@FXML
187+
private Region heimatIcon;
188+
183189
@FXML
184190
private TextField authName;
185191

@@ -274,6 +280,8 @@ private void initialize() {
274280
setRegionSvg(aboutIcon, requiredWidth, requiredHeight, RESOURCE.SVG_ABOUT_ICON);
275281
setRegionSvg(importExportIcon, requiredWidth, requiredHeight, RESOURCE.SVG_IMPORT_EXPORT_ICON);
276282
setRegionSvg(licensesIcon, requiredWidth, requiredHeight, RESOURCE.SVG_LICENSES_ICON);
283+
setRegionSvg(restAPIIcon, requiredWidth, requiredHeight, RESOURCE.SVG_GLOBE_ICON);
284+
setRegionSvg(heimatIcon, requiredWidth, requiredHeight, RESOURCE.SVG_ROTATE_ICON);
277285

278286
initExportButton();
279287
initImportButton();

src/main/resources/layouts/settings.fxml

Lines changed: 106 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,114 @@
452452
</children></AnchorPane>
453453
</content>
454454
<graphic>
455-
<Region fx:id="generalIcon1" prefHeight="15.0" prefWidth="15.0" rotate="-90.0" />
455+
<Region fx:id="restAPIIcon" prefHeight="15.0" prefWidth="15.0" rotate="-90.0" />
456456
</graphic>
457457
</Tab>
458+
<Tab text="HEIMAT">
459+
<content>
460+
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="420.0" prefWidth="407.0">
461+
<children>
462+
<VBox layoutX="14.0" layoutY="14.0" spacing="5.0">
463+
<children>
464+
<VBox styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
465+
<children>
466+
<Label prefHeight="28.0" prefWidth="279.0" text="HEIMAT Integration">
467+
<font>
468+
<Font name="System Bold" size="13.0" />
469+
</font>
470+
</Label>
471+
</children>
472+
</VBox>
473+
<Group>
474+
<children>
475+
<VBox styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
476+
<children>
477+
<Label prefHeight="18.0" prefWidth="286.0" text="Warning this is a beta feature" textFill="#bf5d24">
478+
<font>
479+
<Font name="System Bold" size="12.0" />
480+
</font>
481+
</Label>
482+
</children>
483+
</VBox>
484+
</children>
485+
</Group>
486+
<Group>
487+
<children>
488+
<VBox styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
489+
<children>
490+
<CheckBox fx:id="heimatActivationCheckbox" mnemonicParsing="false" text="Use HEIMAT">
491+
<font>
492+
<Font name="Open Sans Regular" size="12.0" />
493+
</font>
494+
</CheckBox>
495+
<HBox />
496+
<HBox>
497+
<children>
498+
<Label fx:id="labelUsername1" prefWidth="75.0" text="URL" />
499+
<TextField fx:id="heimatUrlTextField" prefHeight="26.0" prefWidth="298.0" promptText="https://your-heimat-domain.com" />
500+
</children>
501+
</HBox>
502+
<HBox>
503+
<children>
504+
<Label fx:id="heimatUrlPreviewLabel" disable="true" prefHeight="21.0" prefWidth="375.0" />
505+
</children>
506+
</HBox>
507+
<HBox>
508+
<children>
509+
<Label fx:id="labelPassword1" prefWidth="125.0" text="AccessToken" />
510+
<PasswordField fx:id="heimatPatTextField" prefHeight="26.0" prefWidth="250.0" promptText="Personal Access Token" />
511+
</children>
512+
</HBox>
513+
<HBox layoutX="11.0" layoutY="75.0">
514+
<children>
515+
<Label fx:id="labelPassword11" disable="true" prefWidth="125.0" text="Expires:" />
516+
<Label fx:id="heimatExpiresLabel" disable="true" layoutX="10.0" layoutY="10.0" prefWidth="250.0" />
517+
</children>
518+
</HBox>
519+
</children>
520+
</VBox>
521+
</children>
522+
</Group>
523+
<Group>
524+
<children>
525+
<VBox styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
526+
<children>
527+
<HBox alignment="CENTER_LEFT">
528+
<children>
529+
<Button fx:id="heimatValidateConnectionButton" mnemonicParsing="false" text="Validate connection" />
530+
<Label fx:id="heimatValidateConnectionLabel" />
531+
</children>
532+
</HBox>
533+
</children>
534+
</VBox>
535+
</children>
536+
</Group>
537+
<Group layoutX="15.0" layoutY="192.0">
538+
<children>
539+
<VBox styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
540+
<children>
541+
<HBox alignment="CENTER_LEFT" spacing="5.0">
542+
<children>
543+
<Button fx:id="heimatMapProjectsButton" mnemonicParsing="false" text="Map projects" />
544+
<Label fx:id="mapProjectsButtonLabel" disable="true" />
545+
</children>
546+
</HBox>
547+
</children>
548+
</VBox>
549+
</children>
550+
</Group>
551+
</children>
552+
<padding>
553+
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
554+
</padding>
555+
</VBox>
556+
</children>
557+
</AnchorPane>
558+
</content>
559+
<graphic>
560+
<Region fx:id="heimatIcon" prefHeight="15.0" prefWidth="15.0" rotate="-90.0" />
561+
</graphic>
562+
</Tab>
458563
<Tab text="Import/Export">
459564
<content>
460565
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="489.0" prefWidth="452.0">
@@ -636,111 +741,6 @@
636741
<Region fx:id="aboutIcon" prefHeight="15.0" prefWidth="15.0" rotate="-90.0" />
637742
</graphic>
638743
</Tab>
639-
<Tab text="HEIMAT">
640-
<content>
641-
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="420.0" prefWidth="407.0">
642-
<children>
643-
<VBox layoutX="14.0" layoutY="14.0" spacing="5.0">
644-
<children>
645-
<VBox styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
646-
<children>
647-
<Label prefHeight="28.0" prefWidth="279.0" text="HEIMAT Integration">
648-
<font>
649-
<Font name="System Bold" size="13.0" />
650-
</font>
651-
</Label>
652-
</children>
653-
</VBox>
654-
<Group>
655-
<children>
656-
<VBox styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
657-
<children>
658-
<Label prefHeight="18.0" prefWidth="286.0" text="Warning this is a beta feature" textFill="#bf5d24">
659-
<font>
660-
<Font name="System Bold" size="12.0" />
661-
</font>
662-
</Label>
663-
</children>
664-
</VBox>
665-
</children>
666-
</Group>
667-
<Group>
668-
<children>
669-
<VBox styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
670-
<children>
671-
<CheckBox fx:id="heimatActivationCheckbox" mnemonicParsing="false" text="Use HEIMAT">
672-
<font>
673-
<Font name="Open Sans Regular" size="12.0" />
674-
</font>
675-
</CheckBox>
676-
<HBox />
677-
<HBox>
678-
<children>
679-
<Label fx:id="labelUsername1" prefWidth="75.0" text="URL" />
680-
<TextField fx:id="heimatUrlTextField" prefHeight="26.0" prefWidth="298.0" promptText="https://your-heimat-domain.com" />
681-
</children>
682-
</HBox>
683-
<HBox>
684-
<children>
685-
<Label fx:id="heimatUrlPreviewLabel" disable="true" prefHeight="21.0" prefWidth="375.0" />
686-
</children>
687-
</HBox>
688-
<HBox>
689-
<children>
690-
<Label fx:id="labelPassword1" prefWidth="125.0" text="AccessToken" />
691-
<PasswordField fx:id="heimatPatTextField" prefHeight="26.0" prefWidth="250.0" promptText="Personal Access Token" />
692-
</children>
693-
</HBox>
694-
<HBox layoutX="11.0" layoutY="75.0">
695-
<children>
696-
<Label fx:id="labelPassword11" disable="true" prefWidth="125.0" text="Expires:" />
697-
<Label fx:id="heimatExpiresLabel" disable="true" layoutX="10.0" layoutY="10.0" prefWidth="250.0" />
698-
</children>
699-
</HBox>
700-
</children>
701-
</VBox>
702-
</children>
703-
</Group>
704-
<Group>
705-
<children>
706-
<VBox styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
707-
<children>
708-
<HBox alignment="CENTER_LEFT">
709-
<children>
710-
<Button fx:id="heimatValidateConnectionButton" mnemonicParsing="false" text="Validate connection" />
711-
<Label fx:id="heimatValidateConnectionLabel" />
712-
</children>
713-
</HBox>
714-
</children>
715-
</VBox>
716-
</children>
717-
</Group>
718-
<Group layoutX="15.0" layoutY="192.0">
719-
<children>
720-
<VBox styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
721-
<children>
722-
<HBox alignment="CENTER_LEFT">
723-
<children>
724-
<Button fx:id="heimatMapProjectsButton" mnemonicParsing="false" text="Map projects" />
725-
<Label fx:id="mapProjectsButtonLabel" />
726-
</children>
727-
</HBox>
728-
</children>
729-
</VBox>
730-
</children>
731-
</Group>
732-
</children>
733-
<padding>
734-
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
735-
</padding>
736-
</VBox>
737-
</children>
738-
</AnchorPane>
739-
</content>
740-
<graphic>
741-
<Region fx:id="generalIcon11" prefHeight="15.0" prefWidth="15.0" rotate="-90.0" />
742-
</graphic>
743-
</Tab>
744744
</tabs>
745745
<styleClass>
746746
<String fx:value="tab-header-area" />
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)