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

-Default Style- similar to -Default Locale- #9

Open
aliebelt opened this issue Jan 7, 2014 · 1 comment
Open

-Default Style- similar to -Default Locale- #9

aliebelt opened this issue Jan 7, 2014 · 1 comment

Comments

@aliebelt
Copy link

aliebelt commented Jan 7, 2014

Hi Adam,

I'm currently integrating afterburner.fx in our R&D software front-end for energy-management (virtual power plant).

We use this front-end in different R&D projects which have different CI colors, fonts and so forth. But this is an issue in many other cases (E.g. use different skins depending on OS or User-Role and so forth)

The basic idea is similar to the -Default Locale- and the properties-files:
-> There are parameters affecting the View.
-> But in contrast to changing the label-text based on the language via properties-files the skin is changed via css-stylesheet(s).

It would be nice, if afterburner.fx would provide skinning via css similar to internationalization via properties.

This maybe could be realized as follows:

-> Set the default style via a style-code (e.g. "custom1") for the whole VM:
[new method]
public static void FXMLView.setDefaultStyle(String styleCode)

-> When reading the stylesheet-name this style-code is added (resulting filename e.g. "myclazz.css" if no custom default style was set or "myclazz_custom1.css" if style-code is "custom1"):
[changed method]
getStyleSheetName() return getConventionalName(getStyleSheetNameSuffix() + ".css");

A package-content could now look like as follows:
MyClazzView.java
MyClazzPresenter.java
myclazz.css
myclazz_custom1.css
myclazz.fxml
myclazz.properties
myclazz_de.properties

@AdamBien
Copy link
Owner

Styling is a very good idea. I'm going to think about skins / styles a bit more. Is a good feature for next version :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants