diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/ScrollComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/ScrollComp.java index 40f5ee2ee..c22fcc544 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/ScrollComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/ScrollComp.java @@ -35,7 +35,9 @@ public class ScrollComp extends Comp> { .bind(Bindings.createDoubleBinding( () -> { var v = bar.getVisibleAmount(); - return v < 1.0 ? 1.0 : 0.0; + // Check for rounding and accuracy issues + // It might not be exactly equal to 1.0 + return v < 0.99 ? 1.0 : 0.0; }, bar.visibleAmountProperty())); diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryComp.java index c333be897..b036ec385 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryComp.java @@ -118,6 +118,7 @@ public class StoreCategoryComp extends SimpleComp { StoreViewState.get().getFilterString()) .getList(); var count = new CountComp<>(shownList, category.getAllContainedEntries(), string -> "(" + string + ")"); + count.visible(Bindings.isNotEmpty(shownList)); var showStatus = hover.or(new SimpleBooleanProperty(DataStorage.get().supportsSharing())) .or(showing); diff --git a/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryListComp.java b/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryListComp.java index da95a9fc9..1745e274a 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryListComp.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/impl/StoreCategoryListComp.java @@ -3,6 +3,7 @@ package io.xpipe.app.fxcomps.impl; import io.xpipe.app.comp.store.StoreCategoryWrapper; import io.xpipe.app.fxcomps.SimpleComp; +import javafx.beans.binding.Bindings; import javafx.scene.layout.Region; public class StoreCategoryListComp extends SimpleComp { @@ -17,6 +18,13 @@ public class StoreCategoryListComp extends SimpleComp { protected Region createSimple() { var sp = new ScrollComp(new StoreCategoryComp(root)); sp.styleClass("store-category-bar"); + sp.apply(struc -> { + Region content = (Region) struc.get().getContent(); + struc.get().minHeightProperty().bind(Bindings.createDoubleBinding(() -> { + var h = content.getHeight(); + return Math.min(200, h + 2); + }, content.heightProperty())); + }); return sp.createRegion(); } } diff --git a/app/src/main/resources/io/xpipe/app/resources/style/scrollbar.css b/app/src/main/resources/io/xpipe/app/resources/style/scrollbar.css index b136c4742..707e56aa1 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/scrollbar.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/scrollbar.css @@ -22,6 +22,7 @@ -fx-background-insets: 0; -fx-padding: 0; -fx-background-color: transparent; + -fx-border-insets: 0; } .scroll-pane:focused {