Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with other JavaFX libraries #41

Open
crschnick opened this issue Feb 22, 2023 · 8 comments
Open

Compatibility with other JavaFX libraries #41

crschnick opened this issue Feb 22, 2023 · 8 comments
Labels
enhancement New feature or request styles

Comments

@crschnick
Copy link

One issue that I have run into is that several other javafx libraries expect modena color scheme definitions to be present. For example, https://github.com/dlsc-software-consulting-gmbh/PreferencesFX will print out all kinds of errors when used with AtlantaFX.
My current solution is to define the manually like this:

* {
-fx-text-fill: -color-fg-default;
-fx-highlight-text-fill:  -color-fg-default;
-fx-highlight-fill: -color-neutral-muted;
-fx-prompt-text-fill: -color-neutral-muted;
-fx-text-box-border:-color-neutral-muted;
-fx-control-inner-background: -color-neutral-muted;
-fx-body-color: -color-neutral-muted;
-fx-inner-border: -color-accent-fg;
}

Maybe they can be defined automatically by AtlantaFX. It doesn't have to be a perfect match, just some default colors that come close to the modena theme.

@mkpaz
Copy link
Owner

mkpaz commented Feb 22, 2023

Third-party libs support is in the backlog. Your suggestion sounds reasonable, though I'd not include this snippet to the themes, but having something like scene.getStylesheets().add("modena-bridge.css") could be useful. Sadly ControlsFX is half-dead and I'd rather work on something else instead of wasting time to support it.

@mkpaz mkpaz added enhancement New feature or request styles labels Mar 11, 2023
@barmat80
Copy link

@crschnick
Can you explain in detail, how you solution works?

@crschnick
Copy link
Author

@crschnick Can you explain in detail, how you solution works?

I just define all the needed style class color definitions from modena.css with the appropriate AtlantaFX color definitions for every single node with *

@dlemmermann
Copy link

@crschnick could you paste that rule here so others can save tons of time?

@crschnick
Copy link
Author

It is the one in the original post

@dlemmermann
Copy link

Ah ok ... I thought there would be more. E.g. -fx-accent, -fx-selection-bar-text etc ....

@crschnick
Copy link
Author

crschnick commented Nov 21, 2023

I originally set colors until it looked fine. There might be some I missed but these did not influence the look of the preferences in my case. To be fair, I switched to using some custom renderers using AtlantaFX controls instead of formsfx controls, so I do not have full coverage of all controls.

@ouaibsky
Copy link

Third-party libs support is in the backlog. Your suggestion sounds reasonable, though I'd not include this snippet to the themes, but having something like scene.getStylesheets().add("modena-bridge.css") could be useful. Sadly ControlsFX is half-dead and I'd rather work on something else instead of wasting time to support it.

Hey, controls is not completely dead.
Version 11.2.0 is available.
You can see how it's complicated to maintain open source software. Despite atlantafx is an awesome project, there is no new commit since almost 6months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request styles
Projects
None yet
Development

No branches or pull requests

5 participants