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

Unified Diff: chrome/browser/autocomplete/autocomplete_popup_view_mac.mm

Issue 188014: [Mac] Make Omnibox a little bit transparent. (Closed)
Patch Set: Tweak for pkasting Created 11 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index 6cc22069f915f36e0c0da79bc953f5610ed9f8e3..497a5bba3fd2b335699f1225b398f4fb4e4b540e 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
@@ -30,6 +30,10 @@ const CGFloat kPopupRoundingRadius = 3.5;
// Gap between the field and the popup.
const CGFloat kPopupFieldGap = 2.0;
+// How opaque the popup window should be. This matches Windows (see
+// autocomplete_popup_contents_view.cc, kGlassPopupTransparency).
+const CGFloat kPopupAlpha = 240.0 / 255.0;
+
// How much space to leave for the left and right margins.
const CGFloat kLeftRightMargin = 8.0;
@@ -48,13 +52,13 @@ const static NSInteger kMiddleButtonNumber(2);
// Background colors for different states of the popup elements.
NSColor* BackgroundColor() {
- return [NSColor controlBackgroundColor];
+ return [[NSColor controlBackgroundColor] colorWithAlphaComponent:kPopupAlpha];
}
NSColor* SelectedBackgroundColor() {
- return [NSColor selectedControlColor];
+ return [[NSColor selectedControlColor] colorWithAlphaComponent:kPopupAlpha];
}
NSColor* HoveredBackgroundColor() {
- return [NSColor controlColor];
+ return [[NSColor controlHighlightColor] colorWithAlphaComponent:kPopupAlpha];
}
// TODO(shess): These are totally unprincipled. I experimented with
« 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