-
Notifications
You must be signed in to change notification settings - Fork 0
Theming
PrinceOfCookies edited this page Jun 5, 2026
·
1 revision
DervaFX currently ships with a single built-in stylesheet:
/com/princeofcookies/dervafx/dervafx-dark.css
Scene scene = new Scene(host, 900, 600);
DervaFX.applyTheme(scene);DervaFX.setTheme(DervaTheme.dark());You can point a DervaTheme at a different stylesheet resource:
DervaTheme custom = DervaTheme.of("custom")
.stylesheetResource("/com/example/my-theme.css");
DervaFX.setTheme(custom);- Themes are scene-level stylesheet attachments.
-
DervaThemeManagertracks scenes and reapplies the current stylesheet when the theme changes. - If a stylesheet resource cannot be found, DervaFX throws an
IllegalStateException.