Styles fixing; code cleanup
This commit is contained in:
parent
bb87b72b91
commit
4177c4672d
4 changed files with 38 additions and 40 deletions
|
@ -27,47 +27,36 @@ public class NSLMain extends Application {
|
||||||
else
|
else
|
||||||
rb = ResourceBundle.getBundle("locale", new Locale("en"));
|
rb = ResourceBundle.getBundle("locale", new Locale("en"));
|
||||||
|
|
||||||
// If it's windows, refuse to work
|
FXMLLoader loader = new FXMLLoader(getClass().getResource("/NSLMain.fxml"));
|
||||||
/*
|
|
||||||
if (System.getProperty("os.name").toLowerCase().startsWith("win")){
|
|
||||||
ServiceWindow.getErrorNotification(rb.getString("windowErrorHeader"), rb.getString("windowItsWindowsMessage"));
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
/*/
|
|
||||||
// If it's not, go ahead
|
|
||||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/NSLMain.fxml"));
|
|
||||||
|
|
||||||
loader.setResources(rb);
|
loader.setResources(rb);
|
||||||
Parent root = loader.load();
|
Parent root = loader.load();
|
||||||
|
|
||||||
primaryStage.getIcons().addAll(
|
primaryStage.getIcons().addAll(
|
||||||
new Image(getClass().getResourceAsStream("/res/app_icon32x32.png")),
|
new Image(getClass().getResourceAsStream("/res/app_icon32x32.png")),
|
||||||
new Image(getClass().getResourceAsStream("/res/app_icon48x48.png")),
|
new Image(getClass().getResourceAsStream("/res/app_icon48x48.png")),
|
||||||
new Image(getClass().getResourceAsStream("/res/app_icon64x64.png")),
|
new Image(getClass().getResourceAsStream("/res/app_icon64x64.png")),
|
||||||
new Image(getClass().getResourceAsStream("/res/app_icon128x128.png"))
|
new Image(getClass().getResourceAsStream("/res/app_icon128x128.png"))
|
||||||
);
|
);
|
||||||
|
|
||||||
primaryStage.setTitle("NS-USBloader");
|
primaryStage.setTitle("NS-USBloader");
|
||||||
primaryStage.setMinWidth(600);
|
primaryStage.setMinWidth(600);
|
||||||
primaryStage.setMinHeight(375);
|
primaryStage.setMinHeight(375);
|
||||||
Scene mainScene = new Scene(root, 800, 400);
|
Scene mainScene = new Scene(root, 800, 400);
|
||||||
mainScene.getStylesheets().add("/res/app.css");
|
mainScene.getStylesheets().add("/res/app.css");
|
||||||
primaryStage.setScene(mainScene);
|
primaryStage.setScene(mainScene);
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
|
|
||||||
primaryStage.setOnCloseRequest(e->{
|
primaryStage.setOnCloseRequest(e->{
|
||||||
if (MediatorControl.getInstance().getTransferActive())
|
if (MediatorControl.getInstance().getTransferActive())
|
||||||
if(! ServiceWindow.getConfirmationWindow(rb.getString("windowTitleConfirmExit"), rb.getString("windowBodyConfirmExit")))
|
if(! ServiceWindow.getConfirmationWindow(rb.getString("windowTitleConfirmExit"), rb.getString("windowBodyConfirmExit")))
|
||||||
e.consume();
|
e.consume();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
/*/
|
|
||||||
}
|
}
|
||||||
/*/
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
if ((args.length == 1) && (args[0].equals("-v") || args[0].equals("--version"))){
|
if ((args.length == 1) && (args[0].equals("-v") || args[0].equals("--version"))){
|
||||||
System.out.println(NSLMain.appVersion);
|
System.out.println("NS-USBloader "+NSLMain.appVersion);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
launch(args);
|
launch(args);
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
btnFileOpen=Select .NSP files
|
btnFileOpen=Select .NSP files
|
||||||
btnUpload=Upload to NS
|
btnUpload=Upload to NS
|
||||||
FilesChooserFileChooser=Selecting single .NSP file:
|
FilesChooserFileChooser=Selecting single .NSP file:
|
||||||
windowItsWindowsMessage=You're on Windows host machine!\nI refuse to work!\n
|
|
||||||
logsEnteredAsMsg1=You have been entered as:
|
logsEnteredAsMsg1=You have been entered as:
|
||||||
logsEnteredAsMsg2=You should be root or have configured 'udev' rules for this user to avoid any issues.
|
logsEnteredAsMsg2=You should be root or have configured 'udev' rules for this user to avoid any issues.
|
||||||
logsFilesToUploadTitle=Files to upload:
|
logsFilesToUploadTitle=Files to upload:
|
||||||
logsGreetingsMessage=Welcome to NS-USBloader
|
logsGreetingsMessage=Welcome to NS-USBloader
|
||||||
logsNoFolderFileSelected=No files selected: nothing to upload.
|
logsNoFolderFileSelected=No files selected: nothing to upload.
|
||||||
windowBodyConfirmExit=Data transfer is in progress and closing this application will interrupt it.\nIt's the worse thing you can do now.\nInterrupt proccess and exit?
|
windowBodyConfirmExit=Data transfer is in progress and closing this application will interrupt it.\nIt's the worse thing you can do now.\nInterrupt proccess and exit?
|
||||||
windowErrorHeader=Error
|
|
||||||
windowTitleConfirmExit=No, don't do this!
|
windowTitleConfirmExit=No, don't do this!
|
||||||
btnStop=Interrupt
|
btnStop=Interrupt
|
||||||
logsGreetingsMessage2=--\n\
|
logsGreetingsMessage2=--\n\
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
btnFileOpen=\u0412\u044B\u0431\u0440\u0430\u0442\u044C .NSP \u0444\u0430\u0439\u043B\u044B
|
btnFileOpen=\u0412\u044B\u0431\u0440\u0430\u0442\u044C .NSP \u0444\u0430\u0439\u043B\u044B
|
||||||
btnUpload=\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0432 NS
|
btnUpload=\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0432 NS
|
||||||
FilesChooserFileChooser=\u0412\u044B\u0431\u043E\u0440 \u043E\u0434\u043D\u043E\u0433\u043E .NSP \u0444\u0430\u0439\u043B\u0430:
|
FilesChooserFileChooser=\u0412\u044B\u0431\u043E\u0440 \u043E\u0434\u043D\u043E\u0433\u043E .NSP \u0444\u0430\u0439\u043B\u0430:
|
||||||
windowItsWindowsMessage=\u042D\u0442\u043E \u0436\u0435 Windows!\n\u0422\u0443\u0442 \u044F \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C \u043D\u0435 \u0431\u0443\u0434\u0443!
|
|
||||||
logsEnteredAsMsg1=\u0412\u044B \u0432\u043E\u0448\u043B\u0438 \u043A\u0430\u043A:
|
logsEnteredAsMsg1=\u0412\u044B \u0432\u043E\u0448\u043B\u0438 \u043A\u0430\u043A:
|
||||||
logsEnteredAsMsg2=\u0427\u0442\u043E\u0431\u044B \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044C \u043E\u0448\u0438\u0431\u043E\u043A, \u0432\u044B \u0434\u043E\u043B\u0436\u043D\u044B \u0431\u044B\u0442\u044C root \u0438\u043B\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043F\u0440\u0430\u0432\u0438\u043B\u0430 'udev' \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F.
|
logsEnteredAsMsg2=\u0427\u0442\u043E\u0431\u044B \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044C \u043E\u0448\u0438\u0431\u043E\u043A, \u0432\u044B \u0434\u043E\u043B\u0436\u043D\u044B \u0431\u044B\u0442\u044C root \u0438\u043B\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043F\u0440\u0430\u0432\u0438\u043B\u0430 'udev' \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F.
|
||||||
logsFilesToUploadTitle=\u0424\u0430\u0439\u043B\u044B \u0434\u043B\u044F \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438:
|
logsFilesToUploadTitle=\u0424\u0430\u0439\u043B\u044B \u0434\u043B\u044F \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438:
|
||||||
logsGreetingsMessage=\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C \u0432 NS-USBloader
|
logsGreetingsMessage=\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C \u0432 NS-USBloader
|
||||||
logsNoFolderFileSelected=\u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043E \u043D\u0438 \u0435\u0434\u0438\u043D\u043E\u0433\u043E \u0444\u0430\u0439\u043B\u0430: \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E.
|
logsNoFolderFileSelected=\u041D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043E \u043D\u0438 \u0435\u0434\u0438\u043D\u043E\u0433\u043E \u0444\u0430\u0439\u043B\u0430: \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E.
|
||||||
windowBodyConfirmExit=\u0421\u0435\u0439\u0447\u0430\u0441 \u043F\u0440\u043E\u0438\u0441\u0445\u043E\u0434\u0438\u0442 \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0434\u0430\u043D\u043D\u044B\u0445 \u0438 \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043F\u0440\u0435\u0440\u0432\u0451\u0442 \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0443.\n\u042D\u0442\u043E \u0445\u0443\u0434\u0448\u0435\u0435 \u0447\u0442\u043E \u0442\u044B \u043C\u043E\u0436\u0435\u0448\u044C \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u0434\u0435\u043B\u0430\u0442\u044C.\n\u041F\u0440\u0435\u0440\u0432\u0430\u0442\u044C \u043F\u0440\u043E\u0446\u0435\u0441\u0441 \u0438 \u0432\u044B\u0439\u0442\u0438?
|
windowBodyConfirmExit=\u0421\u0435\u0439\u0447\u0430\u0441 \u043F\u0440\u043E\u0438\u0441\u0445\u043E\u0434\u0438\u0442 \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0434\u0430\u043D\u043D\u044B\u0445 \u0438 \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u0435 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043F\u0440\u0435\u0440\u0432\u0451\u0442 \u043F\u0435\u0440\u0435\u0434\u0430\u0447\u0443.\n\u042D\u0442\u043E \u0445\u0443\u0434\u0448\u0435\u0435 \u0447\u0442\u043E \u0442\u044B \u043C\u043E\u0436\u0435\u0448\u044C \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u0434\u0435\u043B\u0430\u0442\u044C.\n\u041F\u0440\u0435\u0440\u0432\u0430\u0442\u044C \u043F\u0440\u043E\u0446\u0435\u0441\u0441 \u0438 \u0432\u044B\u0439\u0442\u0438?
|
||||||
windowErrorHeader=\u041E\u0448\u0438\u0431\u043A\u0430
|
|
||||||
windowTitleConfirmExit=\u041D\u0435\u0442, \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0441\u044C!
|
windowTitleConfirmExit=\u041D\u0435\u0442, \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0441\u044C!
|
||||||
btnStop=\u041F\u0440\u0435\u0440\u0432\u0430\u0442\u044C
|
btnStop=\u041F\u0440\u0435\u0440\u0432\u0430\u0442\u044C
|
||||||
logsGreetingsMessage2=--\n\
|
logsGreetingsMessage2=--\n\
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
-fx-background-color: #6a6a6a;
|
-fx-background-color: #6a6a6a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button:pressed, .dialog-pane .button:pressed{
|
.button:pressed{
|
||||||
-fx-background-color: #4f4f4f;
|
-fx-background-color: #4f4f4f;
|
||||||
-fx-border-color: #289de8;
|
-fx-border-color: #289de8;
|
||||||
-fx-border-radius: 3;
|
-fx-border-radius: 3;
|
||||||
|
@ -59,7 +59,6 @@
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
-fx-background-color: transparent;
|
-fx-background-color: transparent;
|
||||||
-fx-box-border: transparent;
|
-fx-box-border: transparent;
|
||||||
-fx-max-height: 10px;
|
|
||||||
}
|
}
|
||||||
.progress-bar > .track {
|
.progress-bar > .track {
|
||||||
-fx-background-color: transparent;
|
-fx-background-color: transparent;
|
||||||
|
@ -67,10 +66,24 @@
|
||||||
}
|
}
|
||||||
.progress-bar > .bar {
|
.progress-bar > .bar {
|
||||||
-fx-background-color: linear-gradient(to right, #00bce4, #ff5f53);
|
-fx-background-color: linear-gradient(to right, #00bce4, #ff5f53);
|
||||||
-fx-background-insets: 3 3 4 3;
|
|
||||||
-fx-background-radius: 2;
|
-fx-background-radius: 2;
|
||||||
|
-fx-background-insets: 1 1 2 1;
|
||||||
|
-fx-padding: 0.23em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dialog-pane {
|
||||||
|
-fx-background-color: #4f4f4f;
|
||||||
|
}
|
||||||
|
.dialog-pane > .button-bar > .container{
|
||||||
|
-fx-background-color: #2d2d2d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-pane > .label{
|
||||||
|
-fx-padding: 10 5 10 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.regionUpload{
|
.regionUpload{
|
||||||
-fx-shape: "M8,21V19H16V21H8M8,17V15H16V17H8M8,13V11H16V13H8M19,9H5L12,2L19,9Z";
|
-fx-shape: "M8,21V19H16V21H8M8,17V15H16V17H8M8,13V11H16V13H8M19,9H5L12,2L19,9Z";
|
||||||
-fx-background-color: #a2e019;
|
-fx-background-color: #a2e019;
|
||||||
|
|
Loading…
Reference in a new issue