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

[Feature Request]: Transparent background color support for WCO on Windows #33567

Closed
3 tasks done
mitchchn opened this issue Apr 1, 2022 · 1 comment · Fixed by #38693
Closed
3 tasks done

[Feature Request]: Transparent background color support for WCO on Windows #33567

mitchchn opened this issue Apr 1, 2022 · 1 comment · Fixed by #38693

Comments

@mitchchn
Copy link
Contributor

mitchchn commented Apr 1, 2022

Preflight Checklist

Problem Description

Window Controls Overlay (WCO) allows for integrated titlebars can be styled to fit the look and feel of any app. But they are styled from the Electron main process, rather than in CSS, which means that there is no simple way to blend them into web content which is always changing.

Authors can set background and symbol colours which match a specific app configuration, but these colours have to be adjusted whenever the page styles change, e.g. due to theme changes, in-app navigation, or dimming caused by modals.

Proposed Solution

Allow color: undefined or color: "transparent" to be set in BrowserWindowOptions.titleBarOverlay.

Alternatives Considered

It is possible to style window controls at any time using BrowserWindow#setTitleBarOverlay (#33066). But web content in some apps is too dynamic for this solution to be practical -- any style change within the titlebar region would need a lifecycle event and IPC, just to simulate transparency at all times,

And because the overlay colour needs to be solid and opaque, there is no way to have the titlebar blend into all possible web content.

Additional Information

No response

@mitchchn mitchchn changed the title [Feature Request]: Transparent background color support for WCO [Feature Request]: Transparent background color support for WCO on Windows Apr 1, 2022
@mitchchn
Copy link
Contributor Author

It looks like it is possible to make the bar transparent using rgba, however this still has consequences:

#33764

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants