mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-24 16:26:21 -04:00
Rework section list style
This commit is contained in:
@@ -26,6 +26,8 @@ public class ListBoxViewComp<T> extends Comp<CompStructure<ScrollPane>> {
|
||||
|
||||
private static final PseudoClass ODD = PseudoClass.getPseudoClass("odd");
|
||||
private static final PseudoClass EVEN = PseudoClass.getPseudoClass("even");
|
||||
private static final PseudoClass FIRST = PseudoClass.getPseudoClass("first");
|
||||
private static final PseudoClass LAST = PseudoClass.getPseudoClass("last");
|
||||
|
||||
private final ObservableList<T> shown;
|
||||
private final ObservableList<T> all;
|
||||
@@ -114,9 +116,10 @@ public class ListBoxViewComp<T> extends Comp<CompStructure<ScrollPane>> {
|
||||
|
||||
for (int i = 0; i < newShown.size(); i++) {
|
||||
var r = newShown.get(i);
|
||||
r.pseudoClassStateChanged(ODD, false);
|
||||
r.pseudoClassStateChanged(EVEN, false);
|
||||
r.pseudoClassStateChanged(i % 2 == 0 ? EVEN : ODD, true);
|
||||
r.pseudoClassStateChanged(ODD, i % 2 != 0);
|
||||
r.pseudoClassStateChanged(EVEN, i % 2 == 0);
|
||||
r.pseudoClassStateChanged(FIRST, i == 0);
|
||||
r.pseudoClassStateChanged(LAST, i == newShown.size() - 1);
|
||||
}
|
||||
|
||||
var d = new DerivedObservableList<>(listView.getChildren(), true);
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
}
|
||||
|
||||
.store-entry-section-comp > .children-content {
|
||||
-fx-padding: 5px 0 5px 25px;
|
||||
-fx-padding: 5px 0 0 25px;
|
||||
}
|
||||
|
||||
.store-entry-section-comp > .separator .line {
|
||||
@@ -136,6 +136,20 @@
|
||||
-fx-background-radius: 4 0 0 4;
|
||||
}
|
||||
|
||||
.store-entry-section-comp:last:sub:expanded {
|
||||
-fx-border-width: 1 0 0 1;
|
||||
-fx-background-radius: 4 0 0 0;
|
||||
-fx-border-radius: 4 0 0 0;
|
||||
}
|
||||
|
||||
.store-entry-section-comp:last:sub {
|
||||
-fx-padding: 0 0 3 0;
|
||||
}
|
||||
|
||||
.store-entry-section-comp:last:sub:expanded {
|
||||
-fx-padding: 0;
|
||||
}
|
||||
|
||||
.root.nord .store-entry-section-comp {
|
||||
-fx-border-radius: 0;
|
||||
-fx-background-radius: 0;
|
||||
|
||||
Reference in New Issue
Block a user