Skip to content

Commit 5be53c6

Browse files
ddamkeddamke
authored andcommitted
add region for bugIcon some css changes
1 parent acd9de9 commit 5be53c6

File tree

3 files changed

+53
-47
lines changed

3 files changed

+53
-47
lines changed

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import javafx.scene.control.*;
2929
import javafx.scene.control.cell.PropertyValueFactory;
3030
import javafx.scene.input.MouseButton;
31-
import javafx.scene.shape.SVGPath;
3231
import javafx.application.Platform;
3332
import org.h2.tools.RunScript;
3433
import org.h2.tools.Script;
@@ -134,7 +133,7 @@ public class SettingsController {
134133
private Button reportBugButton;
135134

136135
@FXML
137-
private SVGPath bugIcon;
136+
private Region bugIcon;
138137

139138
@FXML
140139
private Label versionNumberLabel;
@@ -202,12 +201,12 @@ private void initialize() {
202201
double REQUIRED_WIDTH = 15.0;
203202
double REQUIRED_HEIGHT = 15.0;
204203

205-
setTabSvg(colorIcon,REQUIRED_WIDTH, REQUIRED_HEIGHT,RESOURCE.SVG_COLOR_ICON);
206-
setTabSvg(layoutIcon,REQUIRED_WIDTH, REQUIRED_HEIGHT,RESOURCE.SVG_LAYOUT_ICON);
207-
setTabSvg(generalIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_SETTINGS_ICON);
208-
setTabSvg(aboutIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_ABOUT_ICON);
209-
setTabSvg(importexportIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_IMPORT_EXPORT_ICON);
210-
setTabSvg(licensesIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_LICENSES_ICON);
204+
setRegionSvg(colorIcon,REQUIRED_WIDTH, REQUIRED_HEIGHT,RESOURCE.SVG_COLOR_ICON);
205+
setRegionSvg(layoutIcon,REQUIRED_WIDTH, REQUIRED_HEIGHT,RESOURCE.SVG_LAYOUT_ICON);
206+
setRegionSvg(generalIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_SETTINGS_ICON);
207+
setRegionSvg(aboutIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_ABOUT_ICON);
208+
setRegionSvg(importexportIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_IMPORT_EXPORT_ICON);
209+
setRegionSvg(licensesIcon,REQUIRED_WIDTH,REQUIRED_HEIGHT,RESOURCE.SVG_LICENSES_ICON);
211210

212211
initExportButton();
213212
initImportButton();
@@ -292,7 +291,7 @@ private void initialize() {
292291
initializeAbout();
293292
}
294293

295-
private static void setTabSvg(Region region, Double REQUIRED_WIDTH, Double REQUIRED_HEIGHT,RESOURCE resource) {
294+
private static void setRegionSvg(Region region, Double REQUIRED_WIDTH, Double REQUIRED_HEIGHT, RESOURCE resource) {
296295

297296
region.setShape(SvgNodeProvider.getSvgNodeWithScale(resource,1.0,1.0));
298297
region.setMinSize(REQUIRED_WIDTH, REQUIRED_HEIGHT);
@@ -317,7 +316,7 @@ public void initializeAbout() {
317316
nameColumn.setCellValueFactory(new PropertyValueFactory<>("name"));
318317

319318
//set SvgPath content
320-
bugIcon.setContent(SvgNodeProvider.getSvgPathWithXMl(Resources.RESOURCE.SVG_BUG_ICON));
319+
setRegionSvg(bugIcon,20.0 ,20.0 , RESOURCE.SVG_BUG_ICON);
321320

322321
// licenseColumn
323322
final TableColumn<LicenseTableRow, String> licenseColumn = new TableColumn<>("License");

src/main/resources/css/settingsv2.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
.tab-pane .tab
2626
{
27-
-fx-background-color: white;
27+
-fx-background-color: lightgrey;
2828
-fx-pref-height: 100;
2929
-fx-pref-width: 70;
3030
}
@@ -35,13 +35,14 @@
3535
}
3636
.tab-pane .tab:selected
3737
{
38-
-fx-border-width: 2;
39-
-fx-border-color: blue;
40-
-fx-border-style: solid hidden hidden hidden;
38+
-fx-background-color: white;
4139
}
4240
.tab-pane .tab:hover
4341
{
44-
-fx-background-color: lightgrey;
42+
-fx-border-width: 2;
43+
-fx-border-color: blue;
44+
-fx-border-style: solid hidden hidden hidden;
45+
4546
}
4647

4748

src/main/resources/layouts/settings.fxml

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,18 @@
2727
<?import javafx.scene.control.Tab?>
2828
<?import javafx.scene.control.TabPane?>
2929
<?import javafx.scene.control.TableView?>
30-
<?import javafx.scene.control.TextArea?>
3130
<?import javafx.scene.layout.AnchorPane?>
3231
<?import javafx.scene.layout.HBox?>
3332
<?import javafx.scene.layout.Pane?>
3433
<?import javafx.scene.layout.Region?>
3534
<?import javafx.scene.layout.VBox?>
3635
<?import javafx.scene.shape.Line?>
37-
<?import javafx.scene.shape.SVGPath?>
3836
<?import javafx.scene.text.Font?>
3937
<?import javafx.scene.text.Text?>
4038

41-
<AnchorPane fx:id="settingsRoot" focusTraversable="true" prefHeight="467.0" prefWidth="606.0" style="-fx-background-color: white;" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.doubleslash.keeptime.view.SettingsController">
39+
<AnchorPane fx:id="settingsRoot" focusTraversable="true" prefHeight="467.0" prefWidth="503.0" style="-fx-background-color: white;" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.doubleslash.keeptime.view.SettingsController">
4240
<children>
43-
<TabPane layoutY="6.0" prefHeight="459.0" prefWidth="606.0" side="LEFT" stylesheets="@../css/settingsv2.css" tabClosingPolicy="UNAVAILABLE" tabMinHeight="100.0" tabMinWidth="40.0">
41+
<TabPane layoutY="6.0" prefHeight="459.0" prefWidth="500.0" side="LEFT" stylesheets="@../css/settingsv2.css" tabClosingPolicy="UNAVAILABLE" tabMinHeight="100.0" tabMinWidth="40.0">
4442
<tabs>
4543
<Tab closable="false">
4644
<content>
@@ -166,7 +164,7 @@
166164
<HBox spacing="5.0" styleClass="HBox" stylesheets="@../css/settingsv2.css">
167165
<children>
168166
<Region fx:id="colorIcon" prefHeight="25.0" prefWidth="25.0" />
169-
<Label prefWidth="75.0" text="Color" />
167+
<Label contentDisplay="TOP" prefWidth="75.0" text="Color" />
170168
</children>
171169
</HBox>
172170
</graphic>
@@ -190,9 +188,9 @@
190188
</Label>
191189
</children>
192190
</HBox>
193-
<HBox spacing="10.0">
191+
<HBox prefHeight="18.0" prefWidth="405.0" spacing="10.0">
194192
<children>
195-
<CheckBox fx:id="displayProjectsRightCheckBox" mnemonicParsing="false" text="Display projects on the right">
193+
<CheckBox fx:id="displayProjectsRightCheckBox" mnemonicParsing="false" prefHeight="18.0" prefWidth="199.0" text="Display projects on the right">
196194
<font>
197195
<Font name="Open Sans Regular" size="12.0" />
198196
</font>
@@ -247,7 +245,7 @@
247245
</AnchorPane>
248246
</content>
249247
<graphic>
250-
<HBox styleClass="HBox" stylesheets="@../css/settingsv2.css">
248+
<HBox spacing="5.0" styleClass="HBox" stylesheets="@../css/settingsv2.css">
251249
<children>
252250
<Region fx:id="layoutIcon" prefHeight="25.0" prefWidth="25.0" />
253251
<Label prefWidth="75.0" text="Layout" />
@@ -373,7 +371,7 @@
373371
</AnchorPane>
374372
</content>
375373
<graphic>
376-
<HBox styleClass="HBox" stylesheets="@../css/settingsv2.css">
374+
<HBox spacing="5.0" styleClass="HBox" stylesheets="@../css/settingsv2.css">
377375
<children>
378376
<Region fx:id="generalIcon" prefHeight="25.0" prefWidth="25.0" />
379377
<Label prefWidth="75.0" text="General" />
@@ -385,13 +383,13 @@
385383
<content>
386384
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="489.0" prefWidth="452.0">
387385
<children>
388-
<VBox layoutX="20.0" layoutY="20.0" prefHeight="328.0" prefWidth="458.0" spacing="5.0">
386+
<VBox layoutX="20.0" layoutY="19.0" prefHeight="376.0" prefWidth="343.0" spacing="5.0">
389387
<children>
390388
<Group>
391389
<children>
392-
<VBox alignment="BOTTOM_RIGHT" layoutX="30.0" layoutY="81.0" prefHeight="184.0" prefWidth="472.0" styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
390+
<VBox alignment="BOTTOM_RIGHT" layoutX="30.0" layoutY="81.0" prefHeight="164.0" prefWidth="370.0" styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
393391
<children>
394-
<HBox prefHeight="38.0" prefWidth="470.0">
392+
<HBox prefHeight="18.0" prefWidth="431.0">
395393
<children>
396394
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Import">
397395
<font>
@@ -401,10 +399,10 @@
401399
</HBox>
402400
<HBox prefHeight="88.0" prefWidth="470.0">
403401
<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." />
402+
<Label prefHeight="72.0" prefWidth="368.0" text="Import previously exported .sql file. This will overwrite the currently used database contents. You will need to restart the application after this action. If you proceed you need to select the previouls exported .sql file." textOverrun="CLIP" wrapText="true" HBox.hgrow="NEVER" />
405403
</children>
406404
</HBox>
407-
<HBox alignment="BOTTOM_RIGHT" prefHeight="44.0" prefWidth="470.0">
405+
<HBox alignment="BOTTOM_RIGHT" prefHeight="43.0" prefWidth="428.0">
408406
<children>
409407
<Button fx:id="importButton" alignment="TOP_LEFT" mnemonicParsing="false" text="Import">
410408
<font>
@@ -419,22 +417,22 @@
419417
</Group>
420418
<Group layoutX="10.0" layoutY="10.0" styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
421419
<children>
422-
<VBox alignment="BOTTOM_RIGHT" prefHeight="184.0" prefWidth="472.0" styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
420+
<VBox alignment="BOTTOM_RIGHT" prefHeight="165.0" prefWidth="368.0" styleClass="settingsBorder" stylesheets="@../css/settingsv2.css">
423421
<children>
424-
<HBox prefHeight="29.0" prefWidth="470.0">
422+
<HBox prefHeight="19.0" prefWidth="434.0">
425423
<children>
426424
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Export">
427425
<font>
428426
<Font name="System Bold" size="12.0" />
429427
</font></Text>
430428
</children>
431429
</HBox>
432-
<HBox prefHeight="100.0" prefWidth="200.0">
430+
<HBox prefHeight="94.0" prefWidth="366.0">
433431
<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. " />
432+
<Label text="Export your current Data to an Sql script. This is needed if you go from the Snapshot-1.2.0-KeepTimeto the recent release version. " wrapText="true" />
435433
</children>
436434
</HBox>
437-
<HBox alignment="BOTTOM_RIGHT" prefHeight="30.0" prefWidth="475.0">
435+
<HBox alignment="BOTTOM_RIGHT" prefHeight="30.0" prefWidth="367.0">
438436
<children>
439437
<Button fx:id="exportButton" mnemonicParsing="false" text="Export">
440438
<font>
@@ -456,7 +454,7 @@
456454
</AnchorPane>
457455
</content>
458456
<graphic>
459-
<HBox styleClass="HBox" stylesheets="@../css/settingsv2.css">
457+
<HBox spacing="5.0" styleClass="HBox" stylesheets="@../css/settingsv2.css">
460458
<children>
461459
<Region fx:id="importexportIcon" prefHeight="25.0" prefWidth="25.0" />
462460
<Label prefWidth="75.0" text="Import/Export" />
@@ -468,16 +466,16 @@
468466
<content>
469467
<AnchorPane layoutX="20.0" layoutY="20.0" minHeight="0.0" minWidth="0.0" prefHeight="438.0" prefWidth="489.0">
470468
<children>
471-
<VBox layoutX="20.0" layoutY="20.0" prefHeight="387.0" prefWidth="440.0" spacing="5.0">
469+
<VBox layoutX="20.0" layoutY="20.0" prefHeight="387.0" prefWidth="376.0" spacing="5.0">
472470
<children>
473471
<Group />
474-
<VBox prefHeight="305.0" prefWidth="523.0" spacing="5.0" stylesheets="@../css/settingsv2.css">
472+
<VBox prefHeight="354.0" prefWidth="375.0" spacing="5.0" stylesheets="@../css/settingsv2.css">
475473
<children>
476474
<Label fx:id="thirdPartyLabel" text="Third party software">
477475
<font>
478476
<Font name="System Bold" size="12.0" />
479477
</font></Label>
480-
<TableView fx:id="licenseTableView" fixedCellSize="0.0" focusTraversable="false" prefHeight="283.0" prefWidth="421.0" />
478+
<TableView fx:id="licenseTableView" fixedCellSize="0.0" focusTraversable="false" prefHeight="283.0" prefWidth="357.0" />
481479
</children>
482480
</VBox>
483481
</children>
@@ -489,7 +487,7 @@
489487
</AnchorPane>
490488
</content>
491489
<graphic>
492-
<HBox>
490+
<HBox spacing="5.0">
493491
<children>
494492
<Region fx:id="licensesIcon" prefHeight="25.0" prefWidth="25.0" />
495493
<Label prefWidth="75.0" text="Licenses" />
@@ -503,12 +501,12 @@
503501
<children>
504502
<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">
505503
<children>
506-
<Label fx:id="keepTimeLabel" layoutX="197.0" layoutY="11.0" text="KeepTime">
504+
<Label fx:id="keepTimeLabel" layoutX="138.0" layoutY="14.0" text="KeepTime">
507505
<font>
508506
<Font name="Open Sans Regular" size="26.0" />
509507
</font>
510508
</Label>
511-
<Line fx:id="bigLine" endX="497.0" endY="111.0" fill="BLACK" layoutX="-23.0" layoutY="-39.0" smooth="false" startX="62.0" startY="111.0" strokeWidth="2.0" />
509+
<Line fx:id="bigLine" endX="428.0" endY="111.0" fill="BLACK" layoutX="-23.0" layoutY="-39.0" smooth="false" startX="62.0" startY="111.0" strokeWidth="2.0" />
512510
<Label fx:id="versionLabel" layoutX="39.0" layoutY="92.0" text="Version:">
513511
<font>
514512
<Font name="Open Sans Regular" size="14.0" />
@@ -529,12 +527,15 @@
529527
<Font name="Open Sans Regular" size="14.0" />
530528
</font>
531529
</Hyperlink>
532-
<Line fx:id="smallLine" endX="497.0" endY="273.0" layoutX="-23.0" layoutY="1.0" startX="62.0" startY="273.0" strokeWidth="2.0" />
533-
<Button fx:id="reportBugButton" focusTraversable="false" layoutX="396.0" layoutY="237.0" mnemonicParsing="false" prefHeight="30.0" prefWidth="80" text="Report" />
534-
<Pane layoutX="280" layoutY="227" maxHeight="50.0" maxWidth="135.0" minHeight="50.0" minWidth="50.0" prefHeight="50.0" prefWidth="135.0">
530+
<Line fx:id="smallLine" endX="428.0" endY="273.0" layoutX="-23.0" layoutY="1.0" startX="62.0" startY="273.0" strokeWidth="2.0" />
531+
<Pane layoutX="212.0" layoutY="227.0" maxHeight="50.0" maxWidth="135.0" minHeight="50.0" minWidth="50.0" prefHeight="50.0" prefWidth="117.0">
535532
<children>
536-
<Label contentDisplay="CENTER" layoutY="-5.0" maxHeight="60.0" maxWidth="1.7976931348623157E308" minHeight="50.0" minWidth="50.0" prefHeight="60.0" prefWidth="107.0" text="Found a Bug ?" />
537-
<SVGPath fx:id="bugIcon" layoutX="-160.0" layoutY="-231.0" scaleX="0.04" scaleY="0.04" />
533+
<Region fx:id="bugIcon" layoutX="4.0" layoutY="16.0" prefHeight="15.0" prefWidth="15.0" />
534+
<Button fx:id="reportBugButton" focusTraversable="false" layoutX="28.0" layoutY="10.0" mnemonicParsing="false" prefHeight="30.0" prefWidth="80" text="Report">
535+
<font>
536+
<Font size="14.0" />
537+
</font>
538+
</Button>
538539
</children>
539540
</Pane>
540541
<Label fx:id="versionNumberLabel" layoutX="97.0" layoutY="92.0" text="1.0.0">
@@ -552,13 +553,18 @@
552553
<Font name="Open Sans Regular" size="14.0" />
553554
</font>
554555
</Label>
556+
<Label contentDisplay="CENTER" layoutX="97.0" layoutY="222.0" maxHeight="60.0" maxWidth="1.7976931348623157E308" minHeight="50.0" minWidth="50.0" prefHeight="60.0" prefWidth="107.0" text="Found a Bug ?">
557+
<font>
558+
<Font size="14.0" />
559+
</font>
560+
</Label>
555561
</children>
556562
</Pane>
557563
</children>
558564
</AnchorPane>
559565
</content>
560566
<graphic>
561-
<HBox styleClass="HBox" stylesheets="@../css/settingsv2.css">
567+
<HBox spacing="5.0" styleClass="HBox" stylesheets="@../css/settingsv2.css">
562568
<children>
563569
<Region fx:id="aboutIcon" prefHeight="25.0" prefWidth="25.0" />
564570
<Label prefWidth="75.0" text="About" />

0 commit comments

Comments
 (0)