The details on how to detect dark mode and alter the HWND’s title bar are laid 
out here:

https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/apply-windows-themes

Martin

> On May 1, 2023, at 2:28 PM, John Hendrikx <[email protected]> wrote:
> 
> No easy way as of yet, the border isn't created by JavaFX but by Windows, and 
> I think JavaFX is not responding to the global LIGHT/DARK settings of the 
> platform.  You could try use the StageStyle UNDECORATED or UNIFIED, but that 
> would still involve rendering your own border.
> 
> Other options may include getting the HWND handle and using Windows API 
> directly to change the style.  Getting the HWND (using Windows API) is not 
> too hard, but I'm not sure what you may need to do to change the Window 
> border to use the dark theme.
> 
> --John
> 

Reply via email to