-
Notifications
You must be signed in to change notification settings - Fork 16.3k
feat: add {get|set}AccentColor
on Windows
#47741
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
Conversation
@codebytere nice, just to clarify: this method - when called - changes the option only for the window its called on, it will not impact other windows? So essentially each window can have its own behaviour around |
@bpasero yes, correct! |
41e722c
to
9daba33
Compare
9daba33
to
767e34c
Compare
0cc62a7
to
9ab68b0
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.
LGTM, minor nit
9ab68b0
to
d093701
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.
I'm wondering if it'd be better to have getAccentColor
reflect what was passed to setAccentColor
, rather than trying to insert the system color if accent_color_
is true
. It feels weird for getAccentColor
to return less granular information than what was passed into setAccentColor
🤔
|
||
Sets the system accent color and highlighting of active window border. | ||
|
||
#### `win.getAccentColor()` _Windows_ |
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.
It looks like with this API, it won't be possible to distinguish between a window which has its accent color pinned to the system accent color (e.g. via setAccentColor(true)
) and a window that happens to have the same color as the system accent color (e.g. via setAccentColor(systemPreferences.getAccentColor())
).
Do we want to have a way to explicitly check if a window's accent color follows the System Settings?
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.
@itsananderson we discussed this in API and the way we understood it after discussion is that the window has or doesn't have accent color regardless if whether one was set by the user. E.g. like win.getBounds()
- a window has bounds regardless of whether they were set via win.setBounds
.
d093701
to
bedd478
Compare
Co-authored-by: Will Anderson <andersonw@dropbox.com>
5f9e212
to
25d1da8
Compare
Release Notes Persisted
|
I was unable to backport this PR to "37-x-y" cleanly; |
I was unable to backport this PR to "36-x-y" cleanly; |
I have automatically backported this PR to "38-x-y", please check out #47939 |
/trop run backport-to 37-x-y,36-x-y |
The backport process for this PR has been manually initiated - sending your PR to |
The backport process for this PR has been manually initiated - sending your PR to |
I have automatically backported this PR to "37-x-y", please check out #48017 |
I have automatically backported this PR to "36-x-y", please check out #48018 |
Description of Change
Closes #47584.
Adds the ability to change window accent color on Windows after initial window initialization.
cc @bpasero
Demo
https://gist.github.com/237ddda00daa4fe47fe7b11a4abd9f61
Checklist
npm test
passesRelease Notes
Notes: Adds the ability to change window accent color on Windows after initial window initialization via
{get|set}AccentColor
.