RFR: 8362091: Window title bar should reflect scene color scheme [v3]

Kevin Rushforth kcr at openjdk.org
Wed Oct 1 15:48:41 UTC 2025


On Tue, 30 Sep 2025 20:08:55 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> Currently, the color scheme of a system-decorated stage is as follows:
>> * On Windows, the title bar is always light (even if the OS color scheme is dark).
>> * On macOS and Linux, the title bar is light or dark depending on the OS color scheme.
>> 
>> The expected behavior is that the title bar matches the color scheme of the `Scene`.
>> If an application doesn't specify a color scheme, the title bar color should match the OS color scheme.
>> 
>> This PR fixes the behavior for Windows and macOS, but not for Linux (there's no good way to do that).
>> Depending on how you look at it, this is either a bug fix or an enhancement.
>
> Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
> 
>  - explicitly use wide string functions
>  - Merge branch 'master' into feature/dark-window-frame
>  - Merge branch 'master' into feature/dark-window-frame
>    
>    # Conflicts:
>    #	modules/javafx.graphics/src/main/native-glass/mac/GlassWindow.m
>  - Window decorations adapt to color scheme

My testing looks good.

Suggestion: consider a manual test for this (maybe adding something to MonkeyTester?). We don't have a test program in our repo that sets `Scene.Preference.colorScheme`.

This is pending a second reviewer.

@mstr2 I have updated our closed whitebox test as mentioned above, so it will be ready to go in when your PR is ready. Check with me as to the timing of integrating this.

-------------

Marked as reviewed by kcr (Lead).

PR Review: https://git.openjdk.org/jfx/pull/1845#pullrequestreview-3289880092
PR Comment: https://git.openjdk.org/jfx/pull/1845#issuecomment-3357037624


More information about the openjfx-dev mailing list