Improve section display

This commit is contained in:
crschnick 2024-03-01 16:59:54 +00:00
parent 30ebddc904
commit bb0f6fbeeb
3 changed files with 2 additions and 8 deletions

View file

@ -34,11 +34,6 @@ public class ListBoxViewComp<T> extends Comp<CompStructure<ScrollPane>> {
this.compFunction = compFunction;
}
public ListBoxViewComp<T> withLimit(int limit) {
this.limit = limit;
return this;
}
@Override
public CompStructure<ScrollPane> createBase() {
Map<T, Region> cache = new IdentityHashMap<>();

View file

@ -75,7 +75,7 @@ public class StoreSectionComp extends Comp<CompStructure<VBox>> {
var content = new ListBoxViewComp<>(listSections, section.getAllChildren(), (StoreSection e) -> {
return StoreSection.customSection(e, false).apply(GrowAugment.create(true, false));
})
.withLimit(100)
.minHeight(0)
.hgrow();
var expanded = Bindings.createBooleanBinding(
@ -95,7 +95,7 @@ public class StoreSectionComp extends Comp<CompStructure<VBox>> {
.apply(struc -> struc.get().setFillHeight(true))
.hide(BindingsHelper.persist(Bindings.or(
Bindings.not(section.getWrapper().getExpanded()),
Bindings.size(section.getAllChildren()).isEqualTo(0))))))
Bindings.size(section.getShownChildren()).isEqualTo(0))))))
.styleClass("store-entry-section-comp")
.apply(struc -> {
struc.get().setFillWidth(true);

View file

@ -109,7 +109,6 @@ public class StoreSectionMiniComp extends Comp<CompStructure<VBox>> {
.augment(this.augment)
.build();
})
.withLimit(100)
.minHeight(0)
.hgrow();