kordamp / ikonli

Icon packs for Java applications
http://kordamp.org/ikonli/
Apache License 2.0
496 stars 49 forks source link

Style: The icons in JavaFx when use ":selected" is not working? #144

Closed salmantln closed 3 years ago

salmantln commented 3 years ago

Style the icons in JavaFx when use ":selected" is not working? Or am i doing something wrong. I try using

".button .ikonli-font-icon:selected { -fx-icon-code: "gmi-file-download"; -fx-icon-color: red; -fx-icon-size: 20px; }" in my stylesheet but it doesn't seem to work.

aalmiray commented 3 years ago

IkonFont does not expose pseudo selectors such as :selected, that's the job of the Button type.

salmantln commented 3 years ago

But can I make sure that I change the IkonFont color on the .button:selected ? like is that possible?

aalmiray commented 3 years ago

Refer to the JavaFX CSS guide https://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#buttonbase