Default JavaFX-CSS

后端 未结 5 1421
攒了一身酷
攒了一身酷 2021-02-07 07:55

Is there any way to see the applied CSS-Rules for JavaFX-Elements? Or there is a published reference with the default CSS-Rules available?

I would like, for example , to

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-07 08:52

    Modena theme

    With JavaFX 8 the default CSS is a new theme called Modena. See announcement with screenshots.

    See the latest versions on the OpenJFX site at GitHub.

    The modena.css for the build version Java8_91 can be found here:

    https://gist.github.com/maxd/63691840fc372f22f470

    If you search the css file in different JDK versions this is the way to go.

    JDK below 10.0: $JAVA_HOME/jre/lib/ext/jfxrt.jar --> com/sun/javafx/scene/control/skin/modena.

    JDK for 10.0 and higher: $JAVA_HOME/jmods/javafx.controls.jmod --> classes/com/sun/javafx/scene/control/skin/modena.

提交回复
热议问题