Skip to content

Commit

Permalink
UX improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
goxr3plus committed Aug 2, 2018
1 parent 27140ac commit 5433e53
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 1 addition & 2 deletions resources/fxml/TreeViewManager.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
<?import javafx.scene.layout.VBox?>
<?import org.kordamp.ikonli.javafx.FontIcon?>


<fx:root minHeight="0.0" minWidth="0.0" prefHeight="487.0" prefWidth="275.0" stylesheets="@../style/application.css" type="StackPane" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<VBox fx:id="vBox" alignment="CENTER" minHeight="0.0" minWidth="0.0" style="-fx-background-color: #202020;">
<children>
<HBox minHeight="0.0" minWidth="0.0">
<children>
<Label alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="0.0" minWidth="0.0" style="-fx-border-color: transparent; -fx-background-color: #151515;" styleClass="applicationSettingsLabel2" text=" System Explorer " HBox.hgrow="ALWAYS">
<Label fx:id="topLabel" alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="0.0" minWidth="0.0" style="-fx-border-color: transparent; -fx-background-color: #151515;" styleClass="applicationSettingsLabel2" text=" System Explorer " HBox.hgrow="ALWAYS">
<graphic>
<FontIcon iconColor="#ddaa33" iconLiteral="fas-sitemap" iconSize="24" />
</graphic>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ else if (source == copy)
else if (source == editFileInfo)
Main.tagWindow.openAudio(treeItem.getAbsoluteFilePath(), TagTabCategory.BASICINFO, true);
else if (source == rename)
treeItem.rename(Main.treeManager);
treeItem.rename(Main.topBar);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public class TreeViewManager extends StackPane {
@FXML
private VBox vBox;

@FXML
private Label topLabel;

@FXML
private Button collapseTree;

Expand Down Expand Up @@ -118,7 +121,7 @@ private void initialize() {
} else if (key.getCode() == KeyCode.R) { //RENAME

//Any selected TreeItem ?
Optional.ofNullable(treeView.getSelectionModel().getSelectedItem()).ifPresent(item -> ( (FileTreeItem) item ).rename(this));
Optional.ofNullable(treeView.getSelectionModel().getSelectedItem()).ifPresent(item -> ( (FileTreeItem) item ).rename(topLabel));

} else if (key.getCode() == KeyCode.C) { //COPY

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -820,9 +820,9 @@ else if (key.isControlDown()) { //Short Cuts
if (code == KeyCode.F)
ActionTool.openFileInExplorer(getSelectionModel().getSelectedItem().getFilePath());
else if (code == KeyCode.Q)
getSelectionModel().getSelectedItem().updateStars(getTableView());
getSelectionModel().getSelectedItem().updateStars(smartController.getSearchFieldStackPane());
else if (code == KeyCode.R)
getSelectionModel().getSelectedItem().rename(getTableView());
getSelectionModel().getSelectedItem().rename(smartController.getSearchFieldStackPane());
else if (code == KeyCode.U) {
Media media = getSelectionModel().getSelectedItem();
if (!Main.playedSongs.containsFile(media.getFilePath())) {
Expand Down

0 comments on commit 5433e53

Please sign in to comment.