我已经检查了一些解决方案,例如How to set/remove insets in JavaFX TitledPane,Titled pane css settings和Remove insets in JavaFX TitledPane with CSS not working。还检查了modena.css(行 1829 ),但是当我单击TitledPane
(即聚焦时)时,箭头始终保持发光就像下面的图片一样(可能很难看到)。
这是我的CSS
:
.titledPane {
-fx-background-color: transparent;
-fx-background-insets: 0;
-fx-text-fill: white;
}
.titledPane > .title {
-fx-background-color: black;
-fx-background-insets: 0;
-fx-background-radius: 0;
}
.titledPane:focused > .title {
-fx-background-color: black;
-fx-background-insets: 0;
}
.titledPane > .title > .arrow-button > .arrow{
-fx-background-color: white;
-fx-background-insets: 0;
}
.titledPane:focused > .title > .arrow-button > .arrow{
-fx-background-color: white;
-fx-background-insets: 0;
}
.titledPane:collapsed > .title > .arrow-button > .arrow{
-fx-background-color: white;
-fx-background-insets: 0;
}
.titledPane > .content {
-fx-background-color: white;
}
我还缺少其他什么设置?如果有任何区别,我里面有GridPane
。