Hello again,
A new version of Transit has just been released. This release contains major changes.
Keep reading for details.
User Agent Stylesheet
My previous custom theme which was called JMetro had an issue that could be annoying for developers. Namely it was set as an Author Stylesheet which meant that it would override styles set by the developer through code and might also override his own stylesheet styles (if the styles in JMetro were more specific than the developers’ styles).
This is what usually happens with 90% of the custom-made themes that exist out there.
In Transit I’ve managed to make it so that it acts exactly like Modena (the default JavaFX stylesheet). That is, all stylesheets are User Agent Stylesheets and can be easily overridden.
I had to redefine all styles because it effectively replaces Modena and doesn’t build upon it like JMetro did.
True Dark Mode
JavaFX applications always show up with light styled Window frames and there’s no API to change that. Transit 2.0 however, uses FXThemes behind the scenes to achieve what I call “true dark mode”. What that means is that when you set Transit to dark mode the Window frame of the Scene to which Transit is applied to, will also change to dark.
In the following video you can see this behavior. It shows a sample application that has Transit applied to it.
Final thoughts
As usual, check the transit documentation for more details.
On the next versions I’ll likely focus on improving the looks of each control.
wow you finally did it. You fixed the User Agent Stylesheet issue! Can’t wait to apply it to my Graphing Calculator 3D app.
Hi Saeid.
Thanks! Looking forward to seeing it being used in the Graphing Calculator and also knowing your feedback on using it.
I’m now also working on Transit Theme 3.0 which will have a completely new restyle of controls, etc…