Skip to content

Commit

Permalink
Update shell/browser/api/atom_api_system_preferences_mac.mm
Browse files Browse the repository at this point in the history
Co-Authored-By: Samuel Attard <sattard@slack-corp.com>
  • Loading branch information
codebytere and MarshallOfSound committed Oct 21, 2019
1 parent 2ae3ec3 commit d3806c9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions shell/browser/api/atom_api_system_preferences_mac.mm
Expand Up @@ -509,9 +509,11 @@ AVMediaType ParseMediaType(const std::string& media_type) {
NSColor* sysColor = nil;
if (color == "alternate-selected-control-text") {
sysColor = [NSColor alternateSelectedControlTextColor];
EmitDeprecationWarning(node::Environment::GetCurrent(thrower.isolate()),
"Use selected-content-background instead.",
"electron");
EmitDeprecationWarning(
node::Environment::GetCurrent(thrower.isolate()),
"'alternate-selected-control-text' is deprecated as an input to "
"getColor. Use 'selected-content-background' instead.",
"electron");
} else if (color == "control-background") {
sysColor = [NSColor controlBackgroundColor];
} else if (color == "control") {
Expand All @@ -520,9 +522,6 @@ AVMediaType ParseMediaType(const std::string& media_type) {
sysColor = [NSColor controlTextColor];
} else if (color == "disabled-control-text") {
sysColor = [NSColor disabledControlTextColor];
EmitDeprecationWarning(node::Environment::GetCurrent(thrower.isolate()),
"Use a color that matches the semantics being used.",
"electron");
} else if (color == "find-highlight") {
if (@available(macOS 10.14, *))
sysColor = [NSColor findHighlightColor];
Expand Down

0 comments on commit d3806c9

Please sign in to comment.