summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 18:01:59 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 18:01:59 +0000
commit3fe92d85a949ff4b7b58405d1a91ba9752e4f477 (patch)
treefbb0d6be1c90cfd9e18b5633cb7f26072f160dee /chrome/browser
parent7ad66a71b6ee5acd49e5d94837552bf8e9a013a4 (diff)
downloadchromium_src-3fe92d85a949ff4b7b58405d1a91ba9752e4f477.zip
chromium_src-3fe92d85a949ff4b7b58405d1a91ba9752e4f477.tar.gz
chromium_src-3fe92d85a949ff4b7b58405d1a91ba9752e4f477.tar.bz2
[Mac] Make Omnibox a little bit transparent.
Randomly chose 90% opaque. For some reason -controlColor didn't work right anymore for hovered background, switch to -controlHighlightColor (which sounds closer to the point anyhow). http://crbug.com/20679 TEST=Omnibox popup should be slightly transparent, but not annoyingly so. Review URL: http://codereview.chromium.org/188014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25475 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac.mm10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index 6cc2206..497a5bb 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