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

Unified Diff: chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm

Issue 2241323002: [Material][Mac] Incognito Text Color Fix in the Omnibox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
index cdea965d56e39fda08c72b0b0b9357250576ccfe..5c4886845078d92b58ad400640b2ad40894fa62a 100644
--- a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
@@ -79,6 +79,10 @@ NSRect BubbleDecoration::GetImageRectInFrame(NSRect frame) {
return imageRect;
}
+NSColor* BubbleDecoration::GetDarkModeTextColor() {
+ return skia::SkColorToSRGBNSColor(kMaterialDarkModeTextColor);
+}
+
CGFloat BubbleDecoration::GetWidthForSpace(CGFloat width) {
const CGFloat all_width = GetWidthForImageAndLabel(image_, label_);
if (all_width <= width)
@@ -124,9 +128,7 @@ void BubbleDecoration::DrawInFrame(NSRect frame, NSView* control_view) {
[line stroke];
NSColor* text_color =
- in_dark_mode
- ? skia::SkColorToSRGBNSColor(kMaterialDarkModeTextColor)
- : GetBackgroundBorderColor();
+ in_dark_mode ? GetDarkModeTextColor() : GetBackgroundBorderColor();
SetTextColor(text_color);
}
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/bubble_decoration.h ('k') | chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698