Skip to content

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

@DBChoco

Description

@DBChoco

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    not an issueEverything that is not an issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions