Skip to content

Regression: High contrast themes fail to include Modena.css #809

@jperedadnr

Description

@jperedadnr

After #761, the high contrast themes don't work anymore.

To fix the issue with the user agent for third party controls, the modena.css stylesheet was removed:

 editorControllerTheme.getStylesheetURLs().stream()
                        .filter(s -> !EditorPlatform.isPlatformThemeStylesheetURL(s))
                            .forEach(themeStyleSheetsList::add);

but then setting the high contrast theme fails:

WARNING: Caught 'java.lang.ClassCastException: class java.lang.String cannot be cast to class javafx.scene.paint.Paint (java.lang.String is in module java.base of loader 'bootstrap'; javafx.scene.paint.Paint is in module javafx.graphics@24 of loader 'app')' while converting value for '-fx-background-color' from rule '*.titled-pane>*.title' in stylesheet jar:file:///~/.m2/repository/org/openjfx/javafx-controls/24/javafx-controls-24-mac-aarch64.jar!/com/sun/javafx/scene/control/skin/modena/yellowOnBlack.bss

because it can't read the variables set in modena.css/ .root {}, like -fx-accent.

Expected Behavior

High contrast themes work

Current Behavior

High contrast themes don't work

Steps to Reproduce

Open Scene Builder with an empty workspace
Add an Accordion container
Set a high contrast theme, the exceptions will show up, and only a few nodes will be properly styled.

Your Environment

Screenshots

Image

Removing the filter added in #745 looks like:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions