Skip to content

Commit

Permalink
UI fixes and enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
developersu committed Dec 9, 2020
1 parent d8ea426 commit da62351
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions src/main/java/nsusbloader/Controllers/FilesDropHandle.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.image.Image;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Pane;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.scene.text.TextAlignment;
import javafx.stage.Stage;
import nsusbloader.AppPreferences;
import nsusbloader.MediatorControl;
Expand All @@ -41,11 +40,6 @@
public class FilesDropHandle {

public FilesDropHandle(List<File> files, String filesRegex, String foldersRegex){

//
// TODO: ADD GRAPHICS BEFORE RELEASE !
//

FilesDropHandleTask filesDropHandleTask = new FilesDropHandleTask(files, filesRegex, foldersRegex);

ResourceBundle resourceBundle = MediatorControl.getInstance().getResourceBundle();
Expand All @@ -54,9 +48,10 @@ public FilesDropHandle(List<File> files, String filesRegex, String foldersRegex)
ProgressIndicator progressIndicator = new ProgressIndicator();
progressIndicator.setProgress(ProgressIndicator.INDETERMINATE_PROGRESS);

Label downloadStatusLabel = new Label();
downloadStatusLabel.setWrapText(true);
downloadStatusLabel.textProperty().bind(filesDropHandleTask.messageProperty());
Label statusLabel = new Label();
statusLabel.setWrapText(true);
statusLabel.setTextAlignment(TextAlignment.CENTER);
statusLabel.textProperty().bind(filesDropHandleTask.messageProperty());

Pane fillerPane1 = new Pane();
Pane fillerPane2 = new Pane();
Expand All @@ -68,23 +63,23 @@ public FilesDropHandle(List<File> files, String filesRegex, String foldersRegex)
parentVBox.setPadding(new Insets(5.0));
parentVBox.setFillWidth(true);
parentVBox.getChildren().addAll(
downloadStatusLabel,
statusLabel,
fillerPane1,
progressIndicator,
fillerPane2,
cancelButton
); // TODO:FIX
);

VBox.setVgrow(fillerPane1, Priority.ALWAYS);
VBox.setVgrow(fillerPane2, Priority.ALWAYS);

Stage stage = new Stage();
stage.setTitle(resourceBundle.getString("windowTitleAddingFiles"));
stage.getIcons().addAll(
new Image("/res/dwnload_ico32x32.png"), //TODO: REDRAW
new Image("/res/dwnload_ico48x48.png"),
new Image("/res/dwnload_ico64x64.png"),
new Image("/res/dwnload_ico128x128.png")
new Image("/res/info_ico32x32.png"),
new Image("/res/info_ico48x48.png"),
new Image("/res/info_ico64x64.png"),
new Image("/res/info_ico128x128.png")
);
stage.setMinWidth(300);
stage.setMinHeight(175);
Expand Down
Binary file added src/main/resources/res/info_ico128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/res/info_ico32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/res/info_ico48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/res/info_ico64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit da62351

Please sign in to comment.