JFXtras / jfxtras-styles

Java, JavaFX themes or look and feels. Currently contains JMetro theme.
https://pixelduke.com/java-javafx-theme-jmetro/
643 stars 144 forks source link

JMetro stylesheet errors #187

Closed bretwitt closed 3 years ago

bretwitt commented 3 years ago

Hello, I keep getting the following errors using JMetro, the second one occurs after I highlight text in the ListViews

I'm using the Java11 metro, initially with the Java 15 JDK & Java 15 JFX. I switched to Java 11 JDK & Java 11 JFX to see if that was the issue but that didn't do anything. The FXML was built with SceneBuilder, and I can provide that if needed

I'm not sure if I'm misusing JMetro, but all I'm doing is JMetro jMetro = new JMetro(parent, Style.DARK);

I'm not very experienced with JFX (or CSS) in general, so I might be doing something wrong

(Displaying FXML)

Jan 20, 2021 10:08:48 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Could not resolve 'accent_color' while resolving lookups for '-fx-highlight-fill' from rule '*.text-input' in stylesheet jar:file:/C:/Users/<user>/.m2/repository/org/jfxtras/jmetro/11.6.14/jmetro-11.6.14.jar!/jfxtras/styles/jmetro/dark_theme.css

WARNING: Could not resolve 'accent_color' while resolving lookups for '-fx-text-fill' from rule '*.tab-pane>*.tab-header-area>*.headers-region>*.tab:selected>*.tab-container>*.tab-label' in stylesheet jar:file:/C:/Users/legon/.m2/repository/org/jfxtras/jmetro/11.6.14/jmetro-11.6.14.jar!/jfxtras/styles/jmetro/dark_theme.css
Jan 20, 2021 10:12:04 PM javafx.scene.CssStyleHelper calculateValue

(Highlighting text in ListView)

Jan 20, 2021 10:12:04 PM javafx.scene.CssStyleHelper calculateValue
WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Color (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Color is in unnamed module of loader 'app')' while converting value for '-fx-text-fill' from rule '*.tab-pane>*.tab-header-area>*.headers-region>*.tab:hover>*.tab-container>*.tab-label' in stylesheet jar:file:/C:/Users/<user>/.m2/repository/org/jfxtras/jmetro/11.6.14/jmetro-11.6.14.jar!/jfxtras/styles/jmetro/dark_theme.css
dukke commented 3 years ago

Hi @bretwitt

The 1 issue isn't probably about FXML.

Could you attach a small test case that shows the problem happening? Start with the first error as I have no idea of what your UI has in it or what could be wrong. The second one I already know it should be with the ListView but if you can then also attach a small test case that would be good (but its better to start with the first one).

This is best split into 2 separate issues, I think. Could you file another issue for just the ListView error case and remove the ListView reference from this issue report (this issue will be all about the first error).

About the errors themselves I would point to some CSS variable name being misspelled in JMetro or missing.

Thanks!

dukke commented 3 years ago

Closing this issue due to lack of follow up from the issue's submitter.