diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 23:43:00 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 23:43:00 +0000 |
commit | 8b438c0d681001900e4a74cfc744e19a578476f8 (patch) | |
tree | cb15db370e5926c72c5386d4744ec386e2d5fc3d /chrome/browser | |
parent | 5a0b42e4c702b66ceeaa5c1529b8b03c9d668c74 (diff) | |
download | chromium_src-8b438c0d681001900e4a74cfc744e19a578476f8.zip chromium_src-8b438c0d681001900e4a74cfc744e19a578476f8.tar.gz chromium_src-8b438c0d681001900e4a74cfc744e19a578476f8.tar.bz2 |
[Mac] Un-tweak omnibox height and spacing and font.
Partial revert of http://codereview.chromium.org/3046029 .
Toolbar.xib change to make Omnibox 27px tall again.
Omnibox font back to system size, shift baselines to match, inset
location icon additional pixel to look good WRT text spacing, adjust
ev and keyword bubbles to match, adjust popup to match.
BUG=50765, 50575
TEST=See 50765
Review URL: http://codereview.chromium.org/2806098
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54410 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
4 files changed, 6 insertions, 9 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm index 65750b8..fcf882e 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm +++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm @@ -920,5 +920,5 @@ std::wstring AutocompleteEditViewMac::GetClipboardText(Clipboard* clipboard) { // static NSFont* AutocompleteEditViewMac::GetFieldFont() { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - return rb.GetFont(ResourceBundle::BaseFont).DeriveFont(1).nativeFont(); + return rb.GetFont(ResourceBundle::BaseFont).nativeFont(); } diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm index fb72021..8e78f37 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm +++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm @@ -40,7 +40,7 @@ const CGFloat kPopupFieldGap = 2.0; const CGFloat kPopupAlpha = 240.0 / 255.0; // How far to offset image column from the left. -const CGFloat kImageXOffset = 3.0; +const CGFloat kImageXOffset = 4.0; // How far to offset the text column from the left. const CGFloat kTextXOffset = 26.0; diff --git a/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm b/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm index 48646e6..5d1742b 100644 --- a/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm +++ b/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm @@ -17,11 +17,12 @@ const CGFloat kBaselineAdjust = 3.0; const CGFloat kCornerRadius = 4.0; // How far to inset the left-hand decorations from the field's bounds. -const CGFloat kLeftDecorationXOffset = 4.0; +const CGFloat kLeftDecorationXOffset = 5.0; // How far to inset the right-hand decorations from the field's bounds. // TODO(shess): Why is this different from |kLeftDecorationXOffset|? -const CGFloat kRightDecorationXOffset = 4.0; +// |kDecorationOuterXOffset|? +const CGFloat kRightDecorationXOffset = 5.0; // The amount of padding on either side reserved for drawing // decorations. [Views has |kItemPadding| == 3.] diff --git a/chrome/browser/cocoa/location_bar/bubble_decoration.mm b/chrome/browser/cocoa/location_bar/bubble_decoration.mm index 60c5da2..79570a5 100644 --- a/chrome/browser/cocoa/location_bar/bubble_decoration.mm +++ b/chrome/browser/cocoa/location_bar/bubble_decoration.mm @@ -19,7 +19,7 @@ const CGFloat kBubblePadding = 3.0; // to differ from the location icon's. Indeed, that's how the views // implementation handles the problem. This draws the bubble edge a // little bit further left, which is easier but no less hacky. -const CGFloat kLeftSideOverdraw = 1.0; +const CGFloat kLeftSideOverdraw = 2.0; // Omnibox corner radius is |4.0|, this needs to look tight WRT that. const CGFloat kBubbleCornerRadius = 2.0; @@ -31,9 +31,6 @@ const CGFloat kBubbleCornerRadius = 2.0; // reflect the single pixel space w/in that. const CGFloat kBubbleYInset = 4.0; -// How far to inset the text from the edge of the bubble. -const CGFloat kTextYInset = 1.0; - } // namespace BubbleDecoration::BubbleDecoration(NSFont* font) { @@ -129,7 +126,6 @@ void BubbleDecoration::DrawInFrame(NSRect frame, NSView* control_view) { NSRect textRect = decorationFrame; textRect.origin.x = NSMaxX(imageRect); textRect.size.width = NSMaxX(decorationFrame) - NSMinX(textRect); - textRect.origin.y += kTextYInset; [label_ drawInRect:textRect withAttributes:attributes_]; } } |