Chromium Code Reviews| Index: chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm |
| diff --git a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm |
| index e854cd2d1667e6a4645975d42ff2894b3586e154..a4d904588fa29b96d8903e84155bc62bd9822323 100644 |
| --- a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm |
| +++ b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm |
| @@ -35,10 +35,6 @@ const CGFloat kInfiniteSize = 1.0e6; |
| // an NSTextField does. (Which UX feedback was based on) |
| const CGFloat kLineFragmentPadding = 2.0; |
| -// Padding added on top of the label so its first line looks centered with |
| -// respect to the input field. |
| -const CGFloat kLabelTopPadding = 5.0; |
|
groby-ooo-7-16
2013/12/13 07:19:39
So, what happens with a CVV input? Is that not cen
Ilya Sherman
2013/12/13 07:48:11
Good call, that was very broken. Fixed.
|
| - |
| } |
| // An attachment cell for a single icon - takes care of proper alignment of |
| @@ -109,7 +105,7 @@ const CGFloat kLabelTopPadding = 5.0; |
| base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle( |
| [[NSMutableParagraphStyle alloc] init]); |
| - [paragraphStyle setLineHeightMultiple:1.5]; |
| + [paragraphStyle setLineSpacing:0.5 * [[label_ font] pointSize]]; |
|
groby-ooo-7-16
2013/12/13 07:19:39
Why the change from lineHeightMultiple to lineSpac
Ilya Sherman
2013/12/13 07:48:11
Because lineHeightMultiple reserves space above th
|
| [label_ setDefaultParagraphStyle:paragraphStyle]; |
| inputField_.reset([[AutofillTextField alloc] initWithFrame:NSZeroRect]); |
| @@ -171,7 +167,6 @@ const CGFloat kLabelTopPadding = 5.0; |
| - (NSSize)preferredSize { |
| NSSize size = [label_ bounds].size; |
| - size.height += kLabelTopPadding; |
| // Final inputField_ sizing/spacing depends on a TODO(estade) in Views code. |
| if (![inputField_ isHidden]) { |
| @@ -195,15 +190,13 @@ const CGFloat kLabelTopPadding = 5.0; |
| NSRect labelFrame = [label_ bounds]; |
| labelFrame.origin.x = NSMinX(bounds); |
| - labelFrame.origin.y = |
| - NSMaxY(bounds) - kLabelTopPadding - NSHeight(labelFrame) - kTopPadding; |
| + labelFrame.origin.y = NSMaxY(bounds) - NSHeight(labelFrame) - kTopPadding; |
| // Position input field - top is aligned to top of label field. |
| if (![inputField_ isHidden]) { |
| NSRect inputfieldFrame = [inputField_ frame]; |
| inputfieldFrame.origin.x = NSMaxX(bounds) - NSWidth(inputfieldFrame); |
| - inputfieldFrame.origin.y = |
| - NSMaxY(labelFrame) + kLabelTopPadding - NSHeight(inputfieldFrame); |
| + inputfieldFrame.origin.y = NSMaxY(labelFrame) + NSHeight(inputfieldFrame); |
| [inputField_ setFrameOrigin:inputfieldFrame.origin]; |
| // Due to fixed width, fields are guaranteed to not overlap. |