MaterialFX icon indicating copy to clipboard operation
MaterialFX copied to clipboard

Linear gradient causes "class javafx.scene.paint.LinearGradient cannot be cast to class javafx.scene.paint.Color"

Open DBChoco opened this issue 2 years ago • 1 comments

Describe the bug When using this -common-gradient: linear-gradient(to right bottom, #0af6bb, #420aa4); with this

.mfx-checkbox, .mfx-radio-button{
    -mfx-main: -common-gradient;
}

I get this:

May 17, 2022 12:24:03 AM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class javafx.scene.paint.LinearGradient cannot be cast to class javafx.scene.paint.Color (javafx.scene.paint.LinearGradient and javafx.scene.paint.Color are in module javafx.graphics@18-ea of loader 'app')' while converting value for '-mfx-ripple-color' from rule '*.mfx-checkbox *.ripple-container *.mfx-ripple-generator' in stylesheet jar:file:///home/XXXXXX/.m2/repository/io/github/palexdev/materialfx/11.13.5/materialfx-11.13.5.jar!/io/github/palexdev/materialfx/css/MFXCheckBox.css

MRE(Minimal Reproducible Example) Project is here

To Reproduce Steps to reproduce the behavior:

  1. Just run the Main, then go to the "Settings" scene, where all the checkboxes are.

Screenshots The css does work, it just shows a lot of error messages

DBChoco avatar May 16 '22 22:05 DBChoco

I'll check this asap

palexdev avatar May 31 '22 10:05 palexdev