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
feat: add WCO title bar style setters #33066
Conversation
2a10588
to
16283b5
Compare
6fbac24
to
e41a4e2
Compare
e41a4e2
to
71324b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM
Release Notes Persisted
|
I have automatically backported this PR to "17-x-y", please check out #33439 |
I have automatically backported this PR to "18-x-y", please check out #33440 |
* feat: add wco title bar style setters * return after throwing
* feat: add wco title bar style setters * return after throwing
Description of Change
This PR adds a new API to
BrowserWindow
to change the style of the window controls on a WCO-enabled window (only on Windows):BrowserWindow#setTitleBarOverlay(options: TitleBarOverlay): void
The
options
parameter mimics the options object in theBrowserWindow
constructor. That said, theBrowserWindow
constructor also accepts aboolean
value, which this method does not! At least not right now, that is. Being able to toggle the titlebar overlay on and off on an already-constructed window might require a substantial refactor to recreate/adjust the entire window view hierarchy and modify the native window. Instead, I'm forgoing the toggle so I can just implement what is necessary to adjust the style of the titlebar overlay. This method is can be augmented in the future to add that functionality (that is, this API is future-compatible) if it is ever desired.Checklist
npm test
passesRelease Notes
Notes: Added
BrowserWindow
method to change the button color, symbol color, and height of a window with WCO enabled.