Open runiter opened 1 year ago
HI Saeid,
I've spent quite some time with this but still haven't figured exactly what's wrong.
So far, I've discovered that this only happens when the Spinner control is inside a TabPane.
Hi Pedro, Yeah it's a tough one. When I debugged it I noticed that a method is called that keeps setting the text color to default hence overriding your css value. Not sure why that is only triggered when spinner is inside TabPane though!
@runiter Can you do the following: Create the same simple application you posted here and don't use JMetro. Instead, use a custom stylesheet that simply changes the text color of spinners to a specific color (say red or some other color).
Something like:
.spinner > .text-field {
-fx-text-fill: red;
}
See if the color still changes to black like it's changing in your example... If it does, then it means it is an issue with javafx and not JMetro and we need to submit an issue to the javafx team (I suspect this is the case).
... tell me your findings when you do :)
Sorry for delay. I tried the css your suggest and nope it did not change color to red. The problem with black text persists. Looks like the css gets overriden for jspinner.
I came across a very specific scenario which causes Spinner text color to change into wrong color.
Here is the code to reproduce it:
If you run the above code, initially it shows correct color for spinner text (white):
But if you click on
Tab2
then the color of spinner text changes from white to black: