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

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

Issue 2800853007: Make the answers text color more consistent. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 }; 141 };
142 break; 142 break;
143 case SuggestionAnswer::PERSONALIZED_SUGGESTION: 143 case SuggestionAnswer::PERSONALIZED_SUGGESTION:
144 answer_style = @{ 144 answer_style = @{
145 NSForegroundColorAttributeName : ContentTextColor(is_dark_theme), 145 NSForegroundColorAttributeName : ContentTextColor(is_dark_theme),
146 NSFontAttributeName : FieldFont() 146 NSFontAttributeName : FieldFont()
147 }; 147 };
148 break; 148 break;
149 case SuggestionAnswer::ANSWER_TEXT_MEDIUM: 149 case SuggestionAnswer::ANSWER_TEXT_MEDIUM:
150 answer_style = @{ 150 answer_style = @{
151 NSForegroundColorAttributeName : ContentTextColor(is_dark_theme), 151 NSForegroundColorAttributeName : DimTextColor(is_dark_theme),
groby-ooo-7-16 2017/04/07 23:54:15 I wish we could get those from our theme manager..
152 NSFontAttributeName : FieldFont() 152 NSFontAttributeName : FieldFont()
153 }; 153 };
154 break; 154 break;
155 case SuggestionAnswer::ANSWER_TEXT_LARGE: 155 case SuggestionAnswer::ANSWER_TEXT_LARGE:
156 answer_style = @{ 156 answer_style = @{
157 NSForegroundColorAttributeName : ContentTextColor(is_dark_theme), 157 NSForegroundColorAttributeName : DimTextColor(is_dark_theme),
158 NSFontAttributeName : LargeFont() 158 NSFontAttributeName : LargeFont()
159 }; 159 };
160 break; 160 break;
161 case SuggestionAnswer::SUGGESTION_SECONDARY_TEXT_SMALL: 161 case SuggestionAnswer::SUGGESTION_SECONDARY_TEXT_SMALL:
162 answer_font = FieldFont(); 162 answer_font = FieldFont();
163 answer_style = @{ 163 answer_style = @{
164 NSForegroundColorAttributeName : DimTextColor(is_dark_theme), 164 NSForegroundColorAttributeName : DimTextColor(is_dark_theme),
165 NSFontAttributeName : answer_font 165 NSFontAttributeName : answer_font
166 }; 166 };
167 break; 167 break;
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 base::string16 raw_separator = 679 base::string16 raw_separator =
680 l10n_util::GetStringUTF16(IDS_AUTOCOMPLETE_MATCH_DESCRIPTION_SEPARATOR); 680 l10n_util::GetStringUTF16(IDS_AUTOCOMPLETE_MATCH_DESCRIPTION_SEPARATOR);
681 return CreateAttributedString(raw_separator, DimTextColor(isDarkTheme)); 681 return CreateAttributedString(raw_separator, DimTextColor(isDarkTheme));
682 } 682 }
683 683
684 + (CGFloat)getContentAreaWidth:(NSRect)cellFrame { 684 + (CGFloat)getContentAreaWidth:(NSRect)cellFrame {
685 return NSWidth(cellFrame) - kMaterialTextStartOffset; 685 return NSWidth(cellFrame) - kMaterialTextStartOffset;
686 } 686 }
687 687
688 @end 688 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698