diff --git a/README.md b/README.md
index 188a438..35a4c0c 100644
--- a/README.md
+++ b/README.md
@@ -42,20 +42,20 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="046D", ATTRS{idProduct}=="c33c", GROUP="plug
root # udevadm control --reload-rules && udevadm trigger
```
-### Building
+### Build
`$ mvn package`
+#### Thanks
+
+* [DDinghoya](https://github.com/DDinghoya), who translated this application to Korean!
+
## Support this app
If you like this app, just give a star.
Want to support development? Make a donation* (see below):
-
-
-
-
[ЮMoney](https://yoomoney.ru/to/410014301951665)
*Please note: this is non-commercial application.
@@ -63,6 +63,5 @@ Want to support development? Make a donation* (see below):
#### TODO
* [ ] Tray support: tray icon size checks
-* [ ] Autoload option in settings
* [ ] Headless mode (CLI)
* [x] Add opened file name to info pane
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 2d4dcb7..ceea83d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
loper
LogiLedus
- 1.4-SNAPSHOT
+ 1.5-SNAPSHOT
@@ -148,21 +148,21 @@
com.fasterxml.jackson.core
jackson-core
- 2.10.0
+ 2.13.4
compile
com.fasterxml.jackson.core
jackson-annotations
- 2.10.0
+ 2.13.4
compile
com.fasterxml.jackson.core
jackson-databind
- 2.12.6.1
+ 2.13.4
compile
@@ -177,6 +177,16 @@
${project.artifactId}-${project.version}-${maven.build.timestamp}
+
+
+ src/main/resources
+ false
+
+
+ src/main/resources-filtered
+ true
+
+
org.apache.maven.plugins
diff --git a/src/main/java/logiledus/About/AboutWindow.java b/src/main/java/logiledus/About/AboutWindow.java
index fb07ccc..2cb81d1 100644
--- a/src/main/java/logiledus/About/AboutWindow.java
+++ b/src/main/java/logiledus/About/AboutWindow.java
@@ -9,6 +9,7 @@
import java.io.IOException;
import java.util.Locale;
+import java.util.Objects;
import java.util.ResourceBundle;
public class AboutWindow {
@@ -31,10 +32,10 @@ public AboutWindow(){
stageAbout.setTitle(resourceBundle.getString("menu_item_about"));
stageAbout.getIcons().addAll(
- new Image(getClass().getResourceAsStream("/ico/appIcon_32.png")),
- new Image(getClass().getResourceAsStream("/ico/appIcon_48.png")),
- new Image(getClass().getResourceAsStream("/ico/appIcon_64.png")),
- new Image(getClass().getResourceAsStream("/ico/appIcon_128.png"))
+ new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_32.png"))),
+ new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_48.png"))),
+ new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_64.png"))),
+ new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_128.png")))
);
Scene scene = new Scene(parentAbout, 500, 500);
scene.getStylesheets().add(Mediator.getInstance().getPreferences().getTheme());
diff --git a/src/main/java/logiledus/Controllers/MainController.java b/src/main/java/logiledus/Controllers/MainController.java
index 5a2aef9..7730d40 100644
--- a/src/main/java/logiledus/Controllers/MainController.java
+++ b/src/main/java/logiledus/Controllers/MainController.java
@@ -17,6 +17,7 @@
import java.io.*;
import java.net.URL;
+import java.nio.file.Files;
import java.util.HashMap;
import java.util.List;
import java.util.ResourceBundle;
@@ -113,7 +114,7 @@ private void openConfig(File configFile){
ObjectMapper mapper = new ObjectMapper();
SettingsFileFormat setup;
try{
- setup = mapper.readerFor(SettingsFileFormat.class).readValue(new FileInputStream(configFile));
+ setup = mapper.readerFor(SettingsFileFormat.class).readValue(Files.newInputStream(configFile.toPath()));
KeysLedsController.setConfig(setup.getKeyLedRule());
EffectsController.setConfig(setup.getEffectHumanReadable());
diff --git a/src/main/java/logiledus/MainFx.java b/src/main/java/logiledus/MainFx.java
index 589b14d..eabd34e 100644
--- a/src/main/java/logiledus/MainFx.java
+++ b/src/main/java/logiledus/MainFx.java
@@ -14,10 +14,11 @@
import java.awt.*;
import java.io.IOException;
import java.util.Locale;
+import java.util.Objects;
import java.util.ResourceBundle;
public class MainFx extends Application {
- public static final String appVersion = "v1.4";
+ public static final String appVersion = ResourceBundle.getBundle("app").getString("_version");;
private static boolean traySupport = true;
@@ -29,12 +30,9 @@ public class MainFx extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
- //if (! getParameters().getUnnamed().isEmpty())
- // System.out.println(getParameters().getUnnamed().get(0));
-
AppPreferences appPreferences = new AppPreferences();
- if (traySupport) // By default it's enabled, but in case it disabled from CLI, don't touch.
- traySupport = appPreferences.getUseTray(); // Otherwise, check against preferences
+ if (traySupport) // By default, it's enabled, but in case it disabled from CLI, don't touch.
+ traySupport = appPreferences.getUseTray(); // Otherwise, check against preferences
//-----------------------Tray support---------------------
this.stage = primaryStage;
if (traySupport){
@@ -54,10 +52,10 @@ public void start(Stage primaryStage) throws Exception{
Parent root = loader.load();
primaryStage.getIcons().addAll(
- new Image(getClass().getResourceAsStream("/ico/appIcon_32.png")),
- new Image(getClass().getResourceAsStream("/ico/appIcon_48.png")),
- new Image(getClass().getResourceAsStream("/ico/appIcon_64.png")),
- new Image(getClass().getResourceAsStream("/ico/appIcon_128.png"))
+ new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_32.png"))),
+ new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_48.png"))),
+ new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_64.png"))),
+ new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_128.png")))
);
// NOTE: tray leftovers
if (traySupport) {
@@ -106,7 +104,7 @@ private void addAppToTray(){
tray = SystemTray.getSystemTray();
- trayIcon = new TrayIcon(ImageIO.read(getClass().getResourceAsStream("/ico/appIcon_24.png")));
+ trayIcon = new TrayIcon(ImageIO.read(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_24.png"))));
trayIcon.addActionListener(ActionEvent -> Platform.runLater(this::showStage));
diff --git a/src/main/resources-filtered/app.properties b/src/main/resources-filtered/app.properties
new file mode 100644
index 0000000..fc2f1ed
--- /dev/null
+++ b/src/main/resources-filtered/app.properties
@@ -0,0 +1 @@
+_version=v${project.version}
\ No newline at end of file
diff --git a/src/main/resources/AboutLayout.fxml b/src/main/resources/AboutLayout.fxml
index f837cbb..773eba8 100644
--- a/src/main/resources/AboutLayout.fxml
+++ b/src/main/resources/AboutLayout.fxml
@@ -9,11 +9,10 @@
-
-
+
@@ -44,17 +43,21 @@
-
+
-
+
+
+
+
+
+
-
+
-
diff --git a/src/main/resources/KeysLedsPane.fxml b/src/main/resources/KeysLedsPane.fxml
index 2450074..e3adbb5 100644
--- a/src/main/resources/KeysLedsPane.fxml
+++ b/src/main/resources/KeysLedsPane.fxml
@@ -15,7 +15,7 @@
-
+
diff --git a/src/main/resources/dark.css b/src/main/resources/dark.css
index 3fe5ed6..8954f5c 100644
--- a/src/main/resources/dark.css
+++ b/src/main/resources/dark.css
@@ -132,7 +132,7 @@
.text-area{
-fx-background-color: transparent;
-fx-control-inner-background: #3c3f41;
- -fx-border-color: #06b9bb;
+ -fx-border-color: transparent;
-fx-border-radius: 3;
-fx-border-width: 1;
-fx-text-fill: #ebebeb;
@@ -361,4 +361,123 @@
}
.check-box:selected .mark, .check-box:selected:hover .mark{
-fx-background-color: #4f4f4f;
+}
+.titled-pane
+{
+ -fx-text-fill: white;
+}
+
+.titled-pane:focused
+{
+ -fx-text-fill: white;
+}
+
+.titled-pane > .title
+{
+ -fx-background-color: #54585b;
+ -fx-background-insets: 0, 1, 2;
+ -fx-background-radius: 2 2 2 2;
+ -fx-padding: 3 11 5 11;
+ -fx-border-width: 1;
+ -fx-border-radius: 2 2 2 2;
+ -fx-border-color: #8c6400;
+}
+.titled-pane > .content
+{
+ -fx-border-width: 1;
+ -fx-border-radius: 2 2 2 2;
+ -fx-border-color: #8c6400;
+}
+
+.titled-pane:focused > .title
+{
+ -fx-background-color: #3c3f41;
+ -fx-background-insets: 0, 1, 2;
+ -fx-background-radius: 2 2 2 2;
+ -fx-padding: 3 11 5 11;
+ -fx-border-width: 1;
+ -fx-border-radius: 2 2 2 2;
+ -fx-border-color: #8c6400;
+}
+
+.titled-pane > .title > .arrow-button
+{
+ -fx-background-color: transparent;
+ -fx-background-insets: 0;
+ -fx-background-radius: 0;
+ -fx-padding: 0 3 0 0;
+}
+
+.titled-pane > .title > .arrow-button .arrow
+{
+ -fx-background-color: #575757, #575757;
+ -fx-background-insets: 1 0 -1 0, 0;
+ -fx-padding: 3 3.75 3 3.75;
+ -fx-shape: "M 0 0 h 7 l -3.5 4 z";
+}
+
+.titled-pane:collapsed > .title > .arrow-button .arrow
+{
+ -fx-rotate: -90;
+}
+
+.titled-pane:focused > .title > .arrow-button .arrow
+{
+ -fx-background-color: white, white;
+}
+
+.scroll-bar:horizontal .track,
+.scroll-bar:vertical .track{
+ -fx-background-color :transparent;
+ -fx-border-color :transparent;
+ -fx-background-radius : 0.0em;
+ -fx-border-radius :2.0em;
+}
+.scroll-bar .increment-arrow,
+.scroll-bar .decrement-arrow {
+ -fx-background-color: #71e016;
+}
+
+.scroll-pane > .viewport {
+ -fx-background-color: transparent;
+}
+.scroll-pane{
+ -fx-background-color: #2d2d2d;
+}
+.scroll-pane > .corner,
+.scroll-bar:horizontal,
+.scroll-bar:vertical {
+ -fx-background-color: #2d2d2d;
+}
+
+.scroll-bar:horizontal .track,
+.scroll-bar:vertical .track,
+.scroll-bar:horizontal .decrement-button,
+.scroll-bar:vertical .decrement-button,
+.scroll-bar:horizontal .increment-button,
+.scroll-bar:vertical .increment-button {
+ -fx-background-color: transparent;
+}
+
+.scroll-bar:horizontal .thumb{
+ -fx-background-color: #06bdc3;
+ -fx-background-insets: 4 0 4 0;
+ -fx-background-radius : 5;
+}
+.scroll-bar:horizontal .thumb:hover{
+ -fx-background-color: #08f3ff;
+ -fx-background-insets: 4 0 4 0;
+ -fx-background-radius : 5;
+}
+
+
+.scroll-bar:vertical .thumb {
+ -fx-background-color: #06bdc3;
+ -fx-background-insets: 0 4 0 4;
+ -fx-background-radius : 5;
+}
+.scroll-bar:vertical .thumb:hover {
+ -fx-background-color: #08f3ff;
+ -fx-background-insets: 0 4 0 4;
+ -fx-background-radius : 5;
}
\ No newline at end of file
diff --git a/src/main/resources/locale.properties b/src/main/resources/locale.properties
index 64c5e4e..b03927c 100644
--- a/src/main/resources/locale.properties
+++ b/src/main/resources/locale.properties
@@ -707,3 +707,5 @@ setting_cancel=Cancel
open=Open
setting_use_dark_theme=Use dark theme
setting_open_recent_on_start=Open recent configuration file on application start
+about_ContributorsLbl=Contributors
+about_ContributorsContent=Korean translation by DDinghoya: https://github.com/DDinghoya
diff --git a/src/main/resources/locale_kor.properties b/src/main/resources/locale_kor.properties
index f922aee..5160cb9 100644
--- a/src/main/resources/locale_kor.properties
+++ b/src/main/resources/locale_kor.properties
@@ -33,3 +33,4 @@ setting_cancel=\uCDE8\uC18C
open=\uC5F4\uAE30
setting_use_dark_theme=\uC5B4\uB450\uC6B4 \uD14C\uB9C8 \uC0AC\uC6A9
setting_open_recent_on_start=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC2DC\uC791 \uC2DC \uCD5C\uADFC \uAD6C\uC131 \uD30C\uC77C \uC5F4\uAE30
+about_ContributorsLbl=\uAE30\uC5EC\uC790
diff --git a/src/main/resources/locale_rus.properties b/src/main/resources/locale_rus.properties
index 5dd083e..7c913a5 100644
--- a/src/main/resources/locale_rus.properties
+++ b/src/main/resources/locale_rus.properties
@@ -33,3 +33,6 @@ setting_save_and_close=\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u
open=\u041E\u0442\u043A\u0440\u044B\u0442\u044C
setting_use_dark_theme=\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0442\u0451\u043C\u043D\u0443\u044E \u0442\u0435\u043C\u0443
setting_open_recent_on_start=\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u043F\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F
+about_ContributorsContent=\u041F\u0435\u0440\u0435\u0432\u043E\u0434 \u043D\u0430 \u043A\u043E\u0440\u0435\u0439\u0441\u043A\u0438\u0439 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D DDinghoya - https://github.com/DDinghoya
+about_ContributorsLbl=\u0423\u0447\u0430\u0441\u0442\u043D\u0438\u043A\u0438
+