Transit icon indicating copy to clipboard operation
Transit copied to clipboard

Init owner does not transfer its theme

Open ENeMy235 opened this issue 6 months ago • 0 comments

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.

  1. 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., DialogSample or DialogWithTextFieldSample.
  • Is this a bug, or is it the intended behavior in Transit?
  1. FXTheme not applied on stage initialization in dark mode:
  • Another issue I noticed is that when using the dark style, the FXTheme is 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!

ENeMy235 avatar Jun 03 '25 08:06 ENeMy235