alt: color of scrollbar in popup menu
This commit is contained in:
@@ -38,6 +38,7 @@ public class PopupMenu extends Control {
|
|||||||
private final BooleanProperty alwaysShowingVBar = new SimpleBooleanProperty();
|
private final BooleanProperty alwaysShowingVBar = new SimpleBooleanProperty();
|
||||||
|
|
||||||
public PopupMenu() {
|
public PopupMenu() {
|
||||||
|
getStyleClass().add("popup-menu");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableList<Node> getContent() {
|
public ObservableList<Node> getContent() {
|
||||||
@@ -82,7 +83,7 @@ public class PopupMenu extends Control {
|
|||||||
.otherwise(ScrollPane.ScrollBarPolicy.AS_NEEDED));
|
.otherwise(ScrollPane.ScrollBarPolicy.AS_NEEDED));
|
||||||
|
|
||||||
VBox content = new VBox();
|
VBox content = new VBox();
|
||||||
content.getStyleClass().add("menu");
|
content.getStyleClass().add("content");
|
||||||
Bindings.bindContent(content.getChildren(), PopupMenu.this.getContent());
|
Bindings.bindContent(content.getChildren(), PopupMenu.this.getContent());
|
||||||
scrollPane.setContent(content);
|
scrollPane.setContent(content);
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,11 @@
|
|||||||
-fx-padding: 8 16 8 16;
|
-fx-padding: 8 16 8 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu {
|
.popup-menu .scroll-bar .thumb {
|
||||||
|
-fx-fill: rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-menu .content {
|
||||||
-fx-padding: 4 0 4 0;
|
-fx-padding: 4 0 4 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user