sshahine / JFoenix

JavaFX Material Design Library
MIT License
6.29k stars 1.06k forks source link

Style the icons in JavaFx when use ":selected" is not working? #1216

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.

sshahine commented 3 years ago

You need to manually handle adding / removing the "selected" pseudo class to your icon, else that won't work.