Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: dark window title bars #5732

Merged
merged 1 commit into from
Apr 13, 2023
Merged

Conversation

DevCharly
Copy link
Member

This PR adds launch option -Dapple.awt.application.appearance=system to enabled dark window title bars if macOS is in dark mode.

With this PR:

image

Without:

image

Note that the window title bars get only dark if macOS dark appearance is enabled (in macOS System Preferences > General > Appearance). If macOS is in light mode, the window title bars get light color.

@DevCharly DevCharly added this to the NB18 milestone Mar 28, 2023
@mbien
Copy link
Member

mbien commented Mar 31, 2023

wondering if this should be mapped to a setting. We got the "Maximize use of native look and feel" checkbox under look-and-feel and also a "window decorations" check box in the FlatLaf settings

@neilcsmith-net
Copy link
Member

wondering if this should be mapped to a setting.

While it's a setting in netbeans.conf that might be difficult. Quick look suggests it might be configurable in code, but before AWT is initialized and on the main thread? Could do with considering what has to be set prior to JVM launch, on main thread, and prior to AWT initializing, etc. given how complex .conf files are getting. And consider what needs documenting / adapting in platform harness.

@eirikbakke
Copy link
Contributor

I think this is too fine-grained a detail to warrant its own setting; it's better to just get the default right.

Now, should the default follow the OS, or the NetBeans LAF? Arguably the latter, but the former seems reasonable as well. Presumably, people who like dark themes would have them configured both for NetBeans and MacOS in any case. I'm fine with following the system setting if that's the easiest.

Ideally there would be an option to let NetBeans switch between FlatLAF dark or FlatLAF light based on whether the OS is in dark or light mode. Though that would be a new feature. (And a complication to this: MacOS can be configured to switch between dark and light themes based on the time of the day.)

We got the "Maximize use of native look and feel" checkbox

Grepping through the use of this setting, it's only current effect is to use a native file chooser in some cases (via the "nb.native.filechooser" property). Perhaps this setting should be renamed "Prefer native file chooser" for clarity.

@mbien mbien added UI User Interface os:macos labels Apr 13, 2023
@mbien
Copy link
Member

mbien commented Apr 13, 2023

merging. @DevCharly thanks for all your UI tweaks.

@mbien mbien merged commit 2926b6d into apache:master Apr 13, 2023
@DevCharly DevCharly deleted the macos-dark-window-title branch April 14, 2023 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os:macos UI User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants