Hide the separator line between refreshNavButton and window buttons when refreshNavButton is hidden

This commit is contained in:
huanghongxun
2018-08-07 18:08:20 +08:00
parent 51afcf2dee
commit 61fd581ef5
3 changed files with 6 additions and 1 deletions

View File

@@ -154,6 +154,8 @@ public final class Decorator extends StackPane implements TaskExecutorDialogWiza
private HBox navLeft;
@FXML
private ImageView welcomeView;
@FXML
private Rectangle separator;
public Decorator(Stage primaryStage, Node mainPage, String title) {
this(primaryStage, mainPage, title, true, true);
@@ -190,6 +192,8 @@ public final class Decorator extends StackPane implements TaskExecutorDialogWiza
closeNavButton.setGraphic(SVG.close(Theme.foregroundFillBinding(), 15, 15));
backNavButton.setGraphic(SVG.back(Theme.foregroundFillBinding(), 15, 15));
separator.visibleProperty().bind(refreshNavButton.visibleProperty());
lblTitle.setText(title);
buttonsContainer.setBackground(new Background(new BackgroundFill(Color.BLACK, CornerRadii.EMPTY, Insets.EMPTY)));

View File

@@ -100,7 +100,7 @@
<padding>
<Insets topRightBottomLeft="4.0"/>
</padding>
<Rectangle height="${navBar.height}" width="1" fill="gray"/>
<Rectangle fx:id="separator" height="${navBar.height}" width="1" fill="gray"/>
<JFXButton fx:id="btnMin" styleClass="jfx-decorator-button" ripplerFill="white"
onAction="#onMin">
</JFXButton>

View File

@@ -67,6 +67,7 @@ public class ModpackInstallTask<T> extends Task {
.setReplaceExistentFile(true)
.setFilter((destPath, isDirectory, zipEntry, entryPath) -> {
if (isDirectory) return true;
if (!callback.test(entryPath)) return false;
entries.add(entryPath);
if (!files.containsKey(entryPath)) {