-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Window control overlay does not dim when modal custom dialog shows #159671
Comments
Nice catch! colors can for the overlay can be controlled with https://github.com/electron/electron/blob/main/docs/api/browser-window.md#winsettitlebaroverlayoptions-windows. |
Yeah, its a bit of a layer break dance, we probably would have to call that method from here:
When a custom dialog opens, but since the layer is wrong we need a specific dialog handler for custom dialogs in Note that there is even a user setting to enable custom dialogs for all dialogs on desktop. |
Actually it could easily be added where we process dialogs from the desktop app. We know here if a custom or native dialog opens:
We even have access to the native host service, the only challenge is to find the right color for the WCO. We seem to be adding a large |
If someone wants to tackle this, opening for help. Note, when you run out of sources, you have to force enable WCO here:
And some pseudo code to update the WCO is: this.nativeHostService.updateWindowControls({
backgroundColor: withNullAsUndefined(this.getColor(TITLE_BAR_ACTIVE_BACKGROUND, color => color.blend(new Color(new RGBA(0, 0, 0, 0.3))))),
foregroundColor: withNullAsUndefined(this.getColor(TITLE_BAR_ACTIVE_FOREGROUND, color => color.blend(new Color(new RGBA(0, 0, 0, 0.3))))
}); |
Just throwing another perspective here: the current non-dimmed controls are an accurate representation of the fact that these buttons are still functional, unlike the rest of the title bar. |
Windows Terminal will dim window control buttons when popups are shown (they are still functional). I only know it's now Win32 caption buttons, but not sure whether it's from WinUI or Windows Terminal itself. Traditionally, when model dialogs are visible, the window behind can't be interacted. A recent exception is web browsers, but that's due to being abused by some malicious websites. I personally don't mind if they can still work when dimmed, but I prefer the dimming to provide a more consistent look, and make users focus more on the model dialog currently shown. |
When you open a folder on a fresh user data dir, you see a modal workspace trust custom dialog that dims the background but not the new WCO:
The text was updated successfully, but these errors were encountered: