fix: listview not filled the blank
This commit is contained in:
@@ -34,6 +34,7 @@ import javafx.scene.control.Control;
|
|||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.control.SkinBase;
|
import javafx.scene.control.SkinBase;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
|
import javafx.scene.layout.Priority;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import org.jackhuang.hmcl.util.javafx.MappedObservableList;
|
import org.jackhuang.hmcl.util.javafx.MappedObservableList;
|
||||||
|
|
||||||
@@ -132,6 +133,9 @@ public class ComponentList extends Control {
|
|||||||
list = MappedObservableList.create(control.getContent(), node -> {
|
list = MappedObservableList.create(control.getContent(), node -> {
|
||||||
ComponentListCell cell = new ComponentListCell(node);
|
ComponentListCell cell = new ComponentListCell(node);
|
||||||
cell.getStyleClass().add("options-list-item");
|
cell.getStyleClass().add("options-list-item");
|
||||||
|
if (node.getProperties().containsKey("vgrow")) {
|
||||||
|
VBox.setVgrow(cell, Priority.ALWAYS);
|
||||||
|
}
|
||||||
return cell;
|
return cell;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ public final class VersionsPage extends BorderPane implements WizardPage, Refres
|
|||||||
} else {
|
} else {
|
||||||
centrePane.getContent().setAll(list);
|
centrePane.getContent().setAll(list);
|
||||||
}
|
}
|
||||||
|
list.getProperties().put("vgrow", true);
|
||||||
|
|
||||||
InvalidationListener listener = o -> list.getItems().setAll(loadVersions());
|
InvalidationListener listener = o -> list.getItems().setAll(loadVersions());
|
||||||
chkRelease.selectedProperty().addListener(listener);
|
chkRelease.selectedProperty().addListener(listener);
|
||||||
|
|||||||
Reference in New Issue
Block a user