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
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
45572d1db1
commit
0effa74477
12 changed files with 172 additions and 34 deletions
11
README.md
11
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):
|
||||
|
||||
<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)
|
||||
|
||||
*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
|
18
pom.xml
18
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>loper</groupId>
|
||||
<artifactId>LogiLedus</artifactId>
|
||||
<version>1.4-SNAPSHOT</version>
|
||||
<version>1.5-SNAPSHOT</version>
|
||||
|
||||
<!-- <url></url> -->
|
||||
<description>
|
||||
|
@ -148,21 +148,21 @@
|
|||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>2.10.0</version>
|
||||
<version>2.13.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>2.10.0</version>
|
||||
<version>2.13.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.12.6.1</version>
|
||||
<version>2.13.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -177,6 +177,16 @@
|
|||
</dependencies>
|
||||
<build>
|
||||
<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>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
|
|
@ -9,6 +9,7 @@ import logiledus.Mediator;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class AboutWindow {
|
||||
|
@ -31,10 +32,10 @@ public class 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());
|
||||
|
|
|
@ -17,6 +17,7 @@ import logiledus.USB.KeyLedThread;
|
|||
|
||||
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 @@ public class MainController implements Initializable {
|
|||
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());
|
||||
|
|
|
@ -14,10 +14,11 @@ import javax.swing.*;
|
|||
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 class MainFx extends Application {
|
|||
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 @@ public class MainFx extends Application {
|
|||
|
||||
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));
|
||||
|
||||
|
|
1
src/main/resources-filtered/app.properties
Normal file
1
src/main/resources-filtered/app.properties
Normal file
|
@ -0,0 +1 @@
|
|||
_version=v${project.version}
|
File diff suppressed because one or more lines are too long
|
@ -15,7 +15,7 @@
|
|||
<?import javafx.scene.shape.SVGPath?>
|
||||
<?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>
|
||||
<ToolBar BorderPane.alignment="CENTER">
|
||||
<items>
|
||||
|
|
|
@ -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;
|
||||
|
@ -362,3 +362,122 @@
|
|||
.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;
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue