JavaFX:JMetro更改进度条颜色
我正在使用JavaFX:JMetro更改进度条颜色,java,javafx,Java,Javafx,我正在使用JMetro的不确定进度条。从文档中,我使用以下css进行淡入效果: .progress-bar:indeterminate .dot_1 { -fx-background-color: ACCENT_COLOR; } .progress-bar:indeterminate .dot_2 { -fx-background-color: derive(ACCENT_COLOR, -15%); } .progress-bar:indeterminate .dot_3 {
JMetro
的不确定进度条。从文档中,我使用以下css
进行淡入效果:
.progress-bar:indeterminate .dot_1 {
-fx-background-color: ACCENT_COLOR;
}
.progress-bar:indeterminate .dot_2 {
-fx-background-color: derive(ACCENT_COLOR, -15%);
}
.progress-bar:indeterminate .dot_3 {
-fx-background-color: derive(ACCENT_COLOR, -30%);
}
.progress-bar:indeterminate .dot_4 {
-fx-background-color: derive(ACCENT_COLOR, -45%);
}
.progress-bar:indeterminate .dot_5 {
-fx-background-color: derive(ACCENT_COLOR, -60%);
}
这正如预期的那样有效。但是进度条的颜色是默认的蓝色,我想把它改成白色
仅更改-fx背景颜色:白色
或添加-fx重音:白色
不起作用
我该怎么做呢?
-fx背景色:白色
而不是使用颜色名称。。使用相应颜色的十六进制值解决了该问题