scenebuilder
scenebuilder copied to clipboard
Scene Builder's CSS Analyzer not working on Windows
Originally reported by: Anonymous
I have a problem with Scene Builder's CSS Analyzer but only on Windows.
I have 2 environments (Windows 7 and Ubuntu 16.04) and here is what I have done in both:
-
I have created a new FXML file
-
I have added a anchor pane and set a styleSheet
-
In this anchor pane I have added a Label. I also set the styleSheet here (although this is probably not necessary).
The Label does show the style contained in the styleSheet (I have changed the Font Size and color and I do see the change on the Label) so the styleSheet is "working".
I then opened Scene Builder's CSS Analyzer and select the Label.
On Ubuntu, in the column "styleSheets", I do see what I have set in my styleSheet file. That's fine.
On Windows7, the column "styleSheets" is empty. Only the column "Defaults" is filled and the information looks incorrect: It says the the Font is "System 11.773585319519043px" which is not correct because I have set a Font Size of 26px. Is that a bug of CSS Analyzer?
This is very annoying because it prevents from seeing which CSS rule will be applied.
Thanks for your advices.
- Bitbucket: https://bitbucket.org/gluon-oss/scenebuilder/issue/170
Same issue on all Windows 10 machines I've tested with.
In the example bellow the css sets -fx-text-fill: green
. To enhance the issue, text fill is then set to red
in Scene Builder.
The green property value is not shown in the CSS Analyzer.
JavaFX Scene Builder 11.0.0 Windows 10, amd64, 10.0
Doesn't work on MacOS either
Still not working on windows 10 :
Product Version JavaFX Scene Builder 18.0.0
Build Information Version 18.0.0 Date: 2022-03-31 20:20:30 JavaFX Version: 18 Java Version: 17, OpenJDK Runtime Environment
JavaFX 18
Java 18, OpenJDK Runtime Environment
Java Library Path(s):
Missing or invalid Java Library Path(s): runtime\bin runtime\lib
Operating System Windows 10, amd64, 10.0
Hi @AlmasB, how about giving this issue a higher priority so that we probably can solve it with Scene Builder 20? The CSS Analyzer is core functionality and this should work. I did not review yet how it works in detail but it is something I'll dive into. If you agree, you can assign this one to me.
I've added this to 20, though we still seem to have trailing issues for 18 and 19 that need to be looked at.
Do we have kind of a roadmap which things to resolve first and which things later? Same like #353
This doesn't work on Linux either. This issue has been reported a few times recently. This issue should be given some priority...
I can confirm the behaviour works as expected on 8.5.0 , so it was introduced since. E.g., I can see Stylesheet or Inline Styles in that version.
The bug is also present in SceneBuilder-18.0.0-SNAPSHOT.msi, which seems to be the last downloadable version of SB. Therefore whatever change broke it, was before 18.
I don't know why Gluon links all GitHub releases to this page: https://gluonhq.com/products/scene-builder ... but only provides the latest when you actually land on it (or 8.5.0). People often have reasons for reverting.
@Oliver-Loeffler @AlmasB @johanvos this is a pretty bad bug, I think it should be fixed with priority.
Update: after hacking the download URLs, I was able to download SB 15. The bug is also present there also.
Works in 8.5:
Doesn't work with 15:
Note: I have found at least 6 other separate bug reports about this spanning a couple of years, to it's definitely a desired fix!
@credmond Thanks for your research in this topic. I'll look into this and get in touch with @AlmasB. Would be great if we find a way to revert this into how it was supposed to work.
I think there was a big "Java 9" readiness commit which changes a few of these classes used in this panel, I'd bet it was introduced then somehow...
https://github.com/gluonhq/scenebuilder/pull/198/files
It feels like so. I'll dig into this. Its really a huge commit - it touches almost everything.
It feels like so. I'll dig into this. Its really a huge commit - it touches almost everything.
Yeah :) I think SceneBuilder is a great tool that has lacked some love recently, fixing this (which might fix other associated bugs) would boost the JavaFX ecosystem overall...
Hi all -- any progress on this?
Hi @credmond, unfortunately not yet. I'll still try to see the difference. Actually I have never seen this thing working.
Very cool, I've got Scene Builder 8.5.0 running. With your input I'm now playing with git bisect. May be this helps to identify the relevant change. But first I've to try the CSS inspector.
Well, highest chance candidate is a combination of 011b36870b61f41ee5c7ab6e0c433d940f794028 and 4f07490d2b098f0c5721ce71b038f344715f3c26.
This one is still working: 7eda5ceda0a90b9137fb6f18b919deb490211dea
This is a test candidate (merge conflict resolution) 8b9b73a89a20a03c59ce85c01065ce23e2aee714
This one is also a candidate: 4f07490d2b098f0c5721ce71b038f344715f3c26
bad 01cccf0 good f61d405
To get the debugger in Eclipse running, I had to add following VM parameters:
--module-path "javafx-sdk-22\lib"
--add-modules javafx.controls
--add-modules javafx.base
--add-modules javafx.graphics
--add-modules javafx.fxml
--add-modules javafx.media
--add-exports javafx.media/com.sun.media.jfxmedia.events=ALL-UNNAMED
--add-exports javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.prism=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.glass.ui=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.glass.utils=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.geom.transform=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.font=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.util=ALL-UNNAMED
--add-exports javafx.base/com.sun.javafx.logging=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.scene.input=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.text=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.scene.text=ALL-UNNAMED
--add-exports javafx.graphics/com.sun.javafx.application=ALL-UNNAMED
--add-opens javafx.fxml/javafx.fxml=ALL-UNNAMED
When started without exports, the CssPanel will fail to load.
I am excited... :)
Hi! I have trid in Scene Builder 21 latest yet, still there is a issue in it!
I always have to switch to old Scene Builder 8.5, beacause it have nice feature which one is still missing in new version!
Hi, we aware of this issue and I am investigating the problem. I cannot promise but hope to be able to fix this before the next release.