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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support retrieving Windows system colors #7561

Merged
merged 7 commits into from Oct 12, 2016

Conversation

Projects
None yet
4 participants
@kevinsawicki
Contributor

kevinsawicki commented Oct 11, 2016

Adds a systemPreferences.getColor method on Windows that supports retrieving all the colors from https://msdn.microsoft.com/en-us/library/windows/desktop/ms724371(v=vs.85).aspx

  • Add systemPreferences.getColor
  • Add color-changed event
  • Add specs
  • Add docs

/cc @MarshallOfSound @paulcbetts 馃憖

Refs #7518

@nikola

This comment has been minimized.

nikola commented Oct 12, 2016

Perhaps a note should be added that if users just want to style their HTML/CSS UI in electron using Windows system colors, they don't actually have to use the new interface, but instead they can just write e.g.

myElement {
    border: 1px solid WindowFrame;
    color: WindowText;
}

MDN has a list of supported keywords.

@paulcbetts

This comment has been minimized.

Contributor

paulcbetts commented Oct 12, 2016

Perhaps a note should be added that if users just want to style their HTML/CSS UI in electron using Windows system colors, they don't actually have to use the new interface

Chromium hardcodes these values to canned colors, they don't represent any actual theme 馃槩

@paulcbetts

This comment has been minimized.

Contributor

paulcbetts commented Oct 12, 2016

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Oct 12, 2016

馃憤

@zcbenz zcbenz merged commit 46cd870 into master Oct 12, 2016

9 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
electron-linux-arm Build #4392852 succeeded in 68s
Details
electron-linux-ia32 Build #4392853 succeeded in 58s
Details
electron-linux-x64 Build #4392854 succeeded in 114s
Details
electron-mas-x64 Build #2602 succeeded in 9 min 12 sec
Details
electron-osx-x64 Build #2609 succeeded in 9 min 33 sec
Details
electron-win-ia32 Build #1698 succeeded in 7 min 28 sec
Details
electron-win-x64 Build #1673 succeeded in 8 min 12 sec
Details

@zcbenz zcbenz deleted the windows-system-colors branch Oct 12, 2016

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