Is there a way to easily change the window border color?
Martin Fox
martin at martinfox.com
Tue May 2 00:38:30 UTC 2023
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 <john.hendrikx at gmail.com> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20230501/ce9ed6ae/attachment.htm>
More information about the openjfx-dev
mailing list