Compare commits

...

3 commits

Author SHA1 Message Date
Dmitry Isaenko
0effa74477 Few small but cute UI enhancements, add contributors list to 'About' section, update readme, let application version visible in application to be taken directly from POM
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-20 00:38:33 +03:00
Dmitry Isaenko
45572d1db1
Merge pull request #2 from DDinghoya/patch-1
Create locale_kor.properties
2022-09-19 23:40:39 +03:00
DDinghoya
98ffe83ee5
Create locale_kor.properties 2022-09-19 10:24:05 +09:00
12 changed files with 207 additions and 34 deletions

View file

@ -42,20 +42,20 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="046D", ATTRS{idProduct}=="c33c", GROUP="plug
root # udevadm control --reload-rules && udevadm trigger root # udevadm control --reload-rules && udevadm trigger
``` ```
### Building ### Build
`$ mvn package` `$ mvn package`
#### Thanks
* [DDinghoya](https://github.com/DDinghoya), who translated this application to Korean!
## Support this app ## Support this app
If you like this app, just give a star. If you like this app, just give a star.
Want to support development? Make a donation* (see below): Want to support development? Make a donation* (see below):
<a href="https://liberapay.com/developersu/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a>
<a href="https://paypal.me/developersu" title="PayPal"><img src="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-100px.png" border="0" alt="PayPal Logo" /></a>
[ЮMoney](https://yoomoney.ru/to/410014301951665) [ЮMoney](https://yoomoney.ru/to/410014301951665)
*Please note: this is non-commercial application. *Please note: this is non-commercial application.
@ -63,6 +63,5 @@ Want to support development? Make a donation* (see below):
#### TODO #### TODO
* [ ] Tray support: tray icon size checks * [ ] Tray support: tray icon size checks
* [ ] Autoload option in settings
* [ ] Headless mode (CLI) * [ ] Headless mode (CLI)
* [x] Add opened file name to info pane * [x] Add opened file name to info pane

18
pom.xml
View file

@ -6,7 +6,7 @@
<groupId>loper</groupId> <groupId>loper</groupId>
<artifactId>LogiLedus</artifactId> <artifactId>LogiLedus</artifactId>
<version>1.4-SNAPSHOT</version> <version>1.5-SNAPSHOT</version>
<!-- <url></url> --> <!-- <url></url> -->
<description> <description>
@ -148,21 +148,21 @@
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId> <artifactId>jackson-core</artifactId>
<version>2.10.0</version> <version>2.13.4</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId> <artifactId>jackson-annotations</artifactId>
<version>2.10.0</version> <version>2.13.4</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> <artifactId>jackson-databind</artifactId>
<version>2.12.6.1</version> <version>2.13.4</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
@ -177,6 +177,16 @@
</dependencies> </dependencies>
<build> <build>
<finalName>${project.artifactId}-${project.version}-${maven.build.timestamp}</finalName> <finalName>${project.artifactId}-${project.version}-${maven.build.timestamp}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources-filtered</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View file

@ -9,6 +9,7 @@ import logiledus.Mediator;
import java.io.IOException; import java.io.IOException;
import java.util.Locale; import java.util.Locale;
import java.util.Objects;
import java.util.ResourceBundle; import java.util.ResourceBundle;
public class AboutWindow { public class AboutWindow {
@ -31,10 +32,10 @@ public class AboutWindow {
stageAbout.setTitle(resourceBundle.getString("menu_item_about")); stageAbout.setTitle(resourceBundle.getString("menu_item_about"));
stageAbout.getIcons().addAll( stageAbout.getIcons().addAll(
new Image(getClass().getResourceAsStream("/ico/appIcon_32.png")), new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_32.png"))),
new Image(getClass().getResourceAsStream("/ico/appIcon_48.png")), new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_48.png"))),
new Image(getClass().getResourceAsStream("/ico/appIcon_64.png")), new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_64.png"))),
new Image(getClass().getResourceAsStream("/ico/appIcon_128.png")) new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_128.png")))
); );
Scene scene = new Scene(parentAbout, 500, 500); Scene scene = new Scene(parentAbout, 500, 500);
scene.getStylesheets().add(Mediator.getInstance().getPreferences().getTheme()); scene.getStylesheets().add(Mediator.getInstance().getPreferences().getTheme());

View file

@ -17,6 +17,7 @@ import logiledus.USB.KeyLedThread;
import java.io.*; import java.io.*;
import java.net.URL; import java.net.URL;
import java.nio.file.Files;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.ResourceBundle; import java.util.ResourceBundle;
@ -113,7 +114,7 @@ public class MainController implements Initializable {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
SettingsFileFormat setup; SettingsFileFormat setup;
try{ try{
setup = mapper.readerFor(SettingsFileFormat.class).readValue(new FileInputStream(configFile)); setup = mapper.readerFor(SettingsFileFormat.class).readValue(Files.newInputStream(configFile.toPath()));
KeysLedsController.setConfig(setup.getKeyLedRule()); KeysLedsController.setConfig(setup.getKeyLedRule());
EffectsController.setConfig(setup.getEffectHumanReadable()); EffectsController.setConfig(setup.getEffectHumanReadable());

View file

@ -14,10 +14,11 @@ import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.io.IOException; import java.io.IOException;
import java.util.Locale; import java.util.Locale;
import java.util.Objects;
import java.util.ResourceBundle; import java.util.ResourceBundle;
public class MainFx extends Application { 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; private static boolean traySupport = true;
@ -29,12 +30,9 @@ public class MainFx extends Application {
@Override @Override
public void start(Stage primaryStage) throws Exception{ public void start(Stage primaryStage) throws Exception{
//if (! getParameters().getUnnamed().isEmpty())
// System.out.println(getParameters().getUnnamed().get(0));
AppPreferences appPreferences = new AppPreferences(); AppPreferences appPreferences = new AppPreferences();
if (traySupport) // By default it's enabled, but in case it disabled from CLI, don't touch. if (traySupport) // By default, it's enabled, but in case it disabled from CLI, don't touch.
traySupport = appPreferences.getUseTray(); // Otherwise, check against preferences traySupport = appPreferences.getUseTray(); // Otherwise, check against preferences
//-----------------------Tray support--------------------- //-----------------------Tray support---------------------
this.stage = primaryStage; this.stage = primaryStage;
if (traySupport){ if (traySupport){
@ -54,10 +52,10 @@ public class MainFx extends Application {
Parent root = loader.load(); Parent root = loader.load();
primaryStage.getIcons().addAll( primaryStage.getIcons().addAll(
new Image(getClass().getResourceAsStream("/ico/appIcon_32.png")), new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_32.png"))),
new Image(getClass().getResourceAsStream("/ico/appIcon_48.png")), new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_48.png"))),
new Image(getClass().getResourceAsStream("/ico/appIcon_64.png")), new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_64.png"))),
new Image(getClass().getResourceAsStream("/ico/appIcon_128.png")) new Image(Objects.requireNonNull(getClass().getResourceAsStream("/ico/appIcon_128.png")))
); );
// NOTE: tray leftovers // NOTE: tray leftovers
if (traySupport) { if (traySupport) {
@ -106,7 +104,7 @@ public class MainFx extends Application {
tray = SystemTray.getSystemTray(); 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)); trayIcon.addActionListener(ActionEvent -> Platform.runLater(this::showStage));

View file

@ -0,0 +1 @@
_version=v${project.version}

File diff suppressed because one or more lines are too long

View file

@ -15,7 +15,7 @@
<?import javafx.scene.shape.SVGPath?> <?import javafx.scene.shape.SVGPath?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<BorderPane xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="logiledus.Controllers.KeysLedsController"> <BorderPane xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="logiledus.Controllers.KeysLedsController">
<top> <top>
<ToolBar BorderPane.alignment="CENTER"> <ToolBar BorderPane.alignment="CENTER">
<items> <items>

View file

@ -132,7 +132,7 @@
.text-area{ .text-area{
-fx-background-color: transparent; -fx-background-color: transparent;
-fx-control-inner-background: #3c3f41; -fx-control-inner-background: #3c3f41;
-fx-border-color: #06b9bb; -fx-border-color: transparent;
-fx-border-radius: 3; -fx-border-radius: 3;
-fx-border-width: 1; -fx-border-width: 1;
-fx-text-fill: #ebebeb; -fx-text-fill: #ebebeb;
@ -362,3 +362,122 @@
.check-box:selected .mark, .check-box:selected:hover .mark{ .check-box:selected .mark, .check-box:selected:hover .mark{
-fx-background-color: #4f4f4f; -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;
}

View file

@ -707,3 +707,5 @@ setting_cancel=Cancel
open=Open open=Open
setting_use_dark_theme=Use dark theme setting_use_dark_theme=Use dark theme
setting_open_recent_on_start=Open recent configuration file on application start 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

View file

@ -0,0 +1,36 @@
btn_apply=\uC801\uC6A9
btn_addRule=\uADDC\uCE59 \uCD94\uAC00
btn_removeRule=\uADDC\uCE59 \uC81C\uAC70
about_Lbl_1=LogiLedus\uB294 GNU GPLv3 \uB77C\uC774\uC120\uC2A4\uC5D0 \uB530\uB77C \uBC30\uD3EC\uB429\uB2C8\uB2E4.
about_Lbl_3=\uB4DC\uBBF8\uD2B8\uB9AC \uC774\uC0AC\uC5D4\uCF54\uC5D0 \uC758\uD574 \uAC1C\uBC1C \uBC0F \uC720\uC9C0 \uAD00\uB9AC\uB429\uB2C8\uB2E4.
about_LicenseLbl=\uB77C\uC774\uC13C\uC2A4
menu_item_about=\uC815\uBCF4
effect_disable=\uBC31\uB77C\uC774\uD2B8 \uBE44\uD65C\uC131\uD654
effect_constant=\uC77C\uC815\uD55C \uC0C9\uC0C1
effect_breath=\uD638\uD761
effect_cirles_on_press=\uD074\uB9AD \uC2DC \uC6D0
effect_cycle=\uC8FC\uAE30
effect_wave_horizontal=\uC6E8\uC774\uBE0C \uC218\uD3C9
effect_wave_vertical=\uC6E8\uC774\uBE0C \uC218\uC9C1
effect_wave_center_to_edge=\uC911\uC2EC\uC5D0\uC11C \uAC00\uC7A5\uC790\uB9AC\uB85C \uC6E8\uC774\uBE0C
effect_wave_horizontal_reverse=\uC6E8\uC774\uBE0C \uC218\uD3C9 (\uBC18\uC804)
effect_wave_vertical_reverse=\uC6E8\uC774\uBE0C \uC218\uC9C1 (\uBC18\uC804)
effect_wave_edge_to_center=\uAC00\uC7A5\uC790\uB9AC\uC5D0\uC11C \uC911\uC559\uC73C\uB85C \uC6E8\uC774\uBE0C
btn_reset=\uC7AC\uC124\uC815
tray_close=\uB2EB\uAE30
btn_save=\uC800\uC7A5
btn_save_as=\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5...
error_any_body=\uD655\uC2E4\uD788 \uBB38\uC81C\uC785\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uD130\uBBF8\uB110\uC744 \uC0B4\uD3B4\uBCF4\uC138\uC694.\n\
\uC758\uBBF8\uAC00 \uC5C6\uC73C\uBA74 \uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8 \uBC84\uADF8 \uCD94\uC801\uAE30\uC5D0 \uBCF5\uC0AC\uD558\uC5EC \uBD99\uC5EC\uB123\uC2B5\uB2C8\uB2E4.
error_any_title=\uC557! \uB098\uC05C \uC77C\uC774 \uC77C\uC5B4\uB0AC\uC2B5\uB2C8\uB2E4.
btn_open=\uAD6C\uC131 \uC5F4\uAE30
info_file_saved=\uD30C\uC77C\uC774 \uC800\uC7A5\uB428
info_file_not_saved=\uD30C\uC77C\uC774 \uC800\uC7A5\uB418\uC9C0 \uC54A\uC74C
btn_settings=\uC124\uC815
setting_tray_support=\uD2B8\uB808\uC774\uB85C \uCD5C\uC18C\uD654
setting_save_and_close=\uC800\uC7A5\uD558\uACE0 \uB2EB\uAE30
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

View file

@ -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 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_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 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