Workaround to JFX21 bug causing transparent labels#3892
Conversation
|
Looks like the Label in Group boxes also needs this fix. |
|
And the labels in Tabs |
|
.. and Radio Buttons as well as Check boxes. Now I'm not sure any more if reverting until JFX25 comes out is more practical |
Should be reverted once moved to JFX25. Fix has to be applied to all widgets that set the text fill color using a setter.
91d61f9 to
0c5fec7
Compare
|
|
Thanks for noting those @kasemir - you're right - everywhere that we do a I have just done that for this branch - mostly to show what the solution would look like. I created a helper method to do this to save repeating the same code too much. But we have now modified 12 files... Note, I rebased the branch to keep the changes to a single commit so that we can easily revert it when we move the JFX25. If you have previously checked out the branch there may be problems so I would advise switching back to master, deleting your local version of this branch (fix_jfx21_transparent_labels) and then check it out again. Something like: All that said, if we still think it is simpler to revert the original commits in the PR that caused this issue in JFX21, #3887, then I am happy for that to be the strategy as long as we make a point to test and merge them again when we have moved to JFX25. |
|
Once we get to JFX25, I think we agree that all will be fine. But until that time, what do you prefer? Revert, or update those 12 files? Either way, it would be temporary to keep the main branch usable until JFX25 |
|
To be honest I guess it feels like it would be easier to revert the previous PR commits as that only impacts 2 files instead of changing 12... |
Then do that, and re-apply when we're on JFX25. |



See description and discussion of bug here: #3891.
Bug in JFX21 means that setting the foreground color of the label widget using the setter fails and the label is rendered transparent.
JFX21 bug: https://bugs.openjdk.org/browse/JDK-8336097
This bug has been fixed in JFX24.
The workaround is to set the style using inline CSS.
Once we have moved to JFX25 this workaround should be removed - I have added a TODO for this in the code.
Checklist
Testing:
Documentation: