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

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

Issue 12042002: Alternate NTP: Add search token to omnibox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 7 years, 11 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 c33fa893da5d85b4942a4c0bf592cd2e95ef5f51..013cbe034b5bb7d0824ccd549c83f6d6a5e6a970 100644
--- a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
@@ -23,13 +23,6 @@ const CGFloat kLeftSideOverdraw = 2.0;
// Omnibox corner radius is |4.0|, this needs to look tight WRT that.
const CGFloat kBubbleCornerRadius = 2.0;
-// How far to inset the bubble from the top and bottom of the drawing
-// frame.
-// TODO(shess): Would be nicer to have the drawing code factor out the
-// space outside the border, and perhaps the border. Then this could
-// reflect the single pixel space w/in that.
-const CGFloat kBubbleYInset = 4.0;
-
// Padding between the icon and label.
const CGFloat kIconLabelPadding = 4.0;
@@ -66,7 +59,7 @@ CGFloat BubbleDecoration::GetWidthForImageAndLabel(NSImage* image,
}
NSRect BubbleDecoration::GetImageRectInFrame(NSRect frame) {
- NSRect imageRect = NSInsetRect(frame, 0.0, kBubbleYInset);
+ NSRect imageRect = NSInsetRect(frame, 0.0, kTextYInset);
if (image_) {
// Center the image vertically.
const NSSize imageSize = [image_ size];
@@ -90,7 +83,7 @@ CGFloat BubbleDecoration::GetWidthForSpace(CGFloat width) {
}
void BubbleDecoration::DrawInFrame(NSRect frame, NSView* control_view) {
- const NSRect decorationFrame = NSInsetRect(frame, 0.0, kBubbleYInset);
+ const NSRect decorationFrame = NSInsetRect(frame, 0.0, kTextYInset);
// The inset is to put the border down the middle of the pixel.
NSRect bubbleFrame = NSInsetRect(decorationFrame, 0.5, 0.5);

Powered by Google App Engine
This is Rietveld 408576698