Commit a8403516 authored by spqchan's avatar spqchan Committed by Commit bot

[Material][Mac] Set Incognito Omnibox Dropdown Icons to White

BUG=618763

Review-Url: https://codereview.chromium.org/2082723002
Cr-Commit-Position: refs/heads/master@{#402634}
parent 11291923
......@@ -43,12 +43,11 @@ const NSInteger kMiddleButtonNumber = 2;
[[OmniboxPopupCellData alloc]
initWithMatch:match
contentsOffset:contentsOffset
image:popupView.ImageForMatch(match, NO)
image:popupView.ImageForMatch(match)
answerImage:(match.answer ? answerImage : nil)
forDarkTheme:isDarkTheme]);
if (isDarkTheme) {
[cellData setIncognitoImage:popupView.ImageForMatch(match, YES)];
}
if (isDarkTheme)
[cellData setIncognitoImage:popupView.ImageForMatch(match)];
[array addObject:cellData];
if (match.type == AutocompleteMatchType::SEARCH_SUGGEST_TAIL) {
max_match_contents_width =
......
......@@ -53,8 +53,7 @@ class OmniboxPopupViewMac : public OmniboxPopupView,
size_t row) override;
// Returns the NSImage that should be used as an icon for the given match.
NSImage* ImageForMatch(const AutocompleteMatch& match,
BOOL ignore_dark_theme) const;
NSImage* ImageForMatch(const AutocompleteMatch& match) const;
OmniboxPopupMatrix* matrix() { return matrix_; }
......
......@@ -336,8 +336,8 @@ void OmniboxPopupViewMac::PositionPopup(const CGFloat matrixHeight) {
}
}
NSImage* OmniboxPopupViewMac::ImageForMatch(const AutocompleteMatch& match,
BOOL ignore_dark_theme) const {
NSImage* OmniboxPopupViewMac::ImageForMatch(
const AutocompleteMatch& match) const {
gfx::Image image = model_->GetIconIfExtensionMatch(match);
if (!image.IsEmpty())
return image.AsNSImage();
......@@ -348,7 +348,7 @@ NSImage* OmniboxPopupViewMac::ImageForMatch(const AutocompleteMatch& match,
: AutocompleteMatch::TypeToIcon(match.type);
return OmniboxViewMac::ImageForResource(resource_id);
}
bool is_dark_mode = !ignore_dark_theme && [matrix_ hasDarkTheme];
bool is_dark_mode = [matrix_ hasDarkTheme];
const SkColor icon_color =
is_dark_mode ? SkColorSetA(SK_ColorWHITE, 0xCC) : gfx::kChromeIconGrey;
const gfx::VectorIconId vector_icon_id =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment