Transit
Transit copied to clipboard
Init owner does not transfer its theme
Hi,
I recently started using the Transit Theme (I've used JMetro for the past 4 years), and I've encountered a couple of issues that weren't present in JMetro.
- Dialog theme is not applied with initOwner:
- When opening a new dialog/alert with an initOwner stage, JMetro would retain the current applied theme—even when switching from light to dark mode, the dialogs would reflect that change automatically.
- However, in Transit, this doesn't seem to work as expected. The dialogs don't pick up the current theme correctly.
- You can reproduce this issue using the samples, e.g.,
DialogSampleorDialogWithTextFieldSample. - Is this a bug, or is it the intended behavior in Transit?
- FXTheme not applied on stage initialization in dark mode:
- Another issue I noticed is that when using the dark style, the
FXThemeis not applied to a stage immediately upon initialization. - The stage must be shown first, and then
applyTheme()must be called to update the title bar correctly.
https://github.com/user-attachments/assets/a8b4f0c8-88ef-4c35-82c1-cdb0624b0e27
Thanks for your work on this project!