SceneBuilder应用Gluon主题CSS [英] SceneBuilder Apply Gluon Theme CSS
问题描述
我正在尝试将主题应用到我的jfxml窗口。
在Scene Builder的GUI中,它显示如下:
我现在已经在网上搜索了3个小时,并且没有提出任何CSS加载方法或类似的东西..
虽然您在Scene Builder中获得的Modena默认主题是JavaFX内置发行版的一部分(即jfxrt.jar中包含的modena.css),但Gluon主题却不是。
Scene Builder中包含的Gluon控件和Gluon主题旨在用于Gluon Mobile项目,在桌面以及Android和iOS设备上运行。
您可以使用IDE中的Gluon插件来创建此类项目。如果选择带有FXML项目的MultiView或Glisten-Afterburner项目,您将拥有一个支持FXML的项目。有关如何入门的信息,请参阅此处文档。
I am trying to apply a theme to my jfxml window. In the GUI of Scene Builder, it shows correctly as follows:
But when I compile and run, it shows the button and text area like this:
I've been searching the web for 3 hours now, and came up with no CSS loading method or anything like that..
While the Modena default themes you get in Scene Builder are part of the JavaFX built-in distribution (i.e. modena.css included in jfxrt.jar), the Gluon theme is not.
The Gluon controls and the Gluon theme that are included on Scene Builder are intended to be used in a Gluon Mobile project, that happens to run in Desktop as well as on Android and iOS devices.
You can use the Gluon plugin from your IDE to create such project. If you select MultiView with FXML project or Glisten-Afterburner project, you will have a project with FXML support. See the documentation here on how to get started.
这篇关于SceneBuilder应用Gluon主题CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!