[英]JavaFX: JMetro change Progress bar color
我正在使用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-background-color: white
或添加-fx-accent:white
是行不通的。
我该怎么做 ?
-fx-background-color: white
而不是使用颜色名称。使用相应颜色的十六进制值解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.