Mahdi-Massahi / JavaFX-DarkTheme

A simple JavaFX style css
MIT License
8 stars 2 forks source link

Question #1

Closed sahlaysta closed 1 year ago

sahlaysta commented 1 year ago

May I ask how you managed to change the color of the title bar? Mine stays white

Mahdi-Massahi commented 1 year ago

Hi @sahlaysta, thanks for asking;

This is pretty much an OS dependent thing. The operating system gets to decide how titlebars and borders are displayed by default. However, it definitely can be done, if you are willing to venture into making your own title bar.

To start out, you will need to modify the application window's stage to StageStyle.UNDECORATED. Then you will need to set up your own borders and title bar (complete with things like the title, minimize button, close button, etc.). You can then add the border pane as a scene into your application's stage, and that should render your custom titlebar then without the default Windows styling.

source: https://stackoverflow.com/questions/42583779/how-to-change-the-color-of-title-bar-in-framework-javafx