Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm

Issue 2035153002: Revert of [Mac][Material Design] Bring Omnibox stroke and MD colors up to spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.h" 5 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 NSColor* DimTextColor(BOOL is_dark_theme) { 105 NSColor* DimTextColor(BOOL is_dark_theme) {
106 if (!ui::MaterialDesignController::IsModeMaterial()) { 106 if (!ui::MaterialDesignController::IsModeMaterial()) {
107 return [NSColor darkGrayColor]; 107 return [NSColor darkGrayColor];
108 } 108 }
109 if (is_dark_theme) { 109 if (is_dark_theme) {
110 return skia::SkColorToSRGBNSColor(SkColorSetA(SK_ColorWHITE, 0x7F)); 110 return skia::SkColorToSRGBNSColor(SkColorSetA(SK_ColorWHITE, 0x7F));
111 } 111 }
112 return skia::SkColorToSRGBNSColor(SkColorSetRGB(0x64, 0x64, 0x64)); 112 return skia::SkColorToSRGBNSColor(SkColorSetRGB(0x64, 0x64, 0x64));
113 } 113 }
114 NSColor* PositiveTextColor() { 114 NSColor* PositiveTextColor() {
115 if (!ui::MaterialDesignController::IsModeMaterial()) { 115 return skia::SkColorToCalibratedNSColor(SkColorSetRGB(0x3d, 0x94, 0x00));
116 return skia::SkColorToCalibratedNSColor(SkColorSetRGB(0x3d, 0x94, 0x00));
117 }
118 return skia::SkColorToSRGBNSColor(SkColorSetRGB(0x3d, 0x94, 0x00));
119 } 116 }
120 NSColor* NegativeTextColor() { 117 NSColor* NegativeTextColor() {
121 if (!ui::MaterialDesignController::IsModeMaterial()) { 118 return skia::SkColorToCalibratedNSColor(SkColorSetRGB(0xdd, 0x4b, 0x39));
122 return skia::SkColorToCalibratedNSColor(SkColorSetRGB(0xdd, 0x4b, 0x39));
123 }
124 return skia::SkColorToSRGBNSColor(SkColorSetRGB(0xdd, 0x4b, 0x39));
125 } 119 }
126 NSColor* URLTextColor(BOOL is_dark_theme) { 120 NSColor* URLTextColor(BOOL is_dark_theme) {
127 if (!ui::MaterialDesignController::IsModeMaterial()) { 121 if (!ui::MaterialDesignController::IsModeMaterial()) {
128 return [NSColor colorWithCalibratedRed:0.0 green:0.55 blue:0.0 alpha:1.0]; 122 return [NSColor colorWithCalibratedRed:0.0 green:0.55 blue:0.0 alpha:1.0];
129 } 123 }
130 return is_dark_theme ? skia::SkColorToSRGBNSColor(gfx::kGoogleBlue300) 124 return is_dark_theme ? skia::SkColorToSRGBNSColor(gfx::kGoogleBlue300)
131 : skia::SkColorToSRGBNSColor(gfx::kGoogleBlue700); 125 : skia::SkColorToSRGBNSColor(gfx::kGoogleBlue700);
132 } 126 }
133 127
134 NSFont* FieldFont() { 128 NSFont* FieldFont() {
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 return base::i18n::IsRTL() ? (inputWidth - glyphOffset) : glyphOffset; 709 return base::i18n::IsRTL() ? (inputWidth - glyphOffset) : glyphOffset;
716 } 710 }
717 711
718 + (NSAttributedString*)createSeparatorStringForDarkTheme:(BOOL)isDarkTheme { 712 + (NSAttributedString*)createSeparatorStringForDarkTheme:(BOOL)isDarkTheme {
719 base::string16 raw_separator = 713 base::string16 raw_separator =
720 l10n_util::GetStringUTF16(IDS_AUTOCOMPLETE_MATCH_DESCRIPTION_SEPARATOR); 714 l10n_util::GetStringUTF16(IDS_AUTOCOMPLETE_MATCH_DESCRIPTION_SEPARATOR);
721 return CreateAttributedString(raw_separator, DimTextColor(isDarkTheme)); 715 return CreateAttributedString(raw_separator, DimTextColor(isDarkTheme));
722 } 716 }
723 717
724 @end 718 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698