mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-22 10:43:57 -04:00
update
This commit is contained in:
parent
8b4ff578a2
commit
9afa43e5ae
@ -41,26 +41,9 @@ public class AdvancedListBox extends ScrollPane {
|
||||
setFitToHeight(true);
|
||||
setFitToWidth(true);
|
||||
setHbarPolicy(ScrollBarPolicy.NEVER);
|
||||
setVbarPolicy(ScrollBarPolicy.NEVER);
|
||||
|
||||
container.getStyleClass().add("advanced-list-box-content");
|
||||
|
||||
getStyleClass().add("advanced-list-box");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void layoutChildren() {
|
||||
super.layoutChildren();
|
||||
ScrollBarPolicy newPolicy;
|
||||
if (container.getHeight() > getHeight()) {
|
||||
newPolicy = ScrollBarPolicy.AS_NEEDED;
|
||||
} else {
|
||||
newPolicy = ScrollBarPolicy.NEVER;
|
||||
}
|
||||
|
||||
if (lastVbarPolicy == null || newPolicy != lastVbarPolicy) {
|
||||
setVbarPolicy(newPolicy);
|
||||
lastVbarPolicy = newPolicy;
|
||||
}
|
||||
}
|
||||
|
||||
public AdvancedListBox add(Node child) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user