Animating the opacity property of Label does not result in smooth changes from fully transparent to fully opaque as expected. I think maybe the skin has not bound its Text node's opacity to the opacity property of the Label.
The bug is easily illustrated, if you create two labels and have them animate with this timeline:
titleTimeline = new Timeline(
new KeyFrame(
Duration.ZERO,
new KeyValue(title.scaleXProperty(), 0.5),
new KeyValue(title.scaleYProperty(), 0.5),
new KeyValue(title.opacityProperty(), 0),
new KeyValue(fakeTitle.scaleXProperty(), 1),
new KeyValue(fakeTitle.scaleYProperty(), 1),
new KeyValue(fakeTitle.opacityProperty(), 1)
),
new KeyFrame(
Duration.millis(1000),
new KeyValue(title.scaleXProperty(), 1),
new KeyValue(title.scaleYProperty(), 1),
new KeyValue(title.opacityProperty(), 1),
new KeyValue(fakeTitle.scaleXProperty(), 2),
new KeyValue(fakeTitle.scaleYProperty(), 2),
new KeyValue(fakeTitle.opacityProperty(), 0)
)
);
The bug is easily illustrated, if you create two labels and have them animate with this timeline:
titleTimeline = new Timeline(
new KeyFrame(
Duration.ZERO,
new KeyValue(title.scaleXProperty(), 0.5),
new KeyValue(title.scaleYProperty(), 0.5),
new KeyValue(title.opacityProperty(), 0),
new KeyValue(fakeTitle.scaleXProperty(), 1),
new KeyValue(fakeTitle.scaleYProperty(), 1),
new KeyValue(fakeTitle.opacityProperty(), 1)
),
new KeyFrame(
Duration.millis(1000),
new KeyValue(title.scaleXProperty(), 1),
new KeyValue(title.scaleYProperty(), 1),
new KeyValue(title.opacityProperty(), 1),
new KeyValue(fakeTitle.scaleXProperty(), 2),
new KeyValue(fakeTitle.scaleYProperty(), 2),
new KeyValue(fakeTitle.opacityProperty(), 0)
)
);
- relates to
-
JDK-8128466 Disabled state is not shown (opacity 40%) if opacity was changed.
- Closed