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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm

Issue 21724002: rAc: try really hard not to ellipsize addresses (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // TODO(groby): Can we make all the individual setters private and just 81 // TODO(groby): Can we make all the individual setters private and just
82 // update state as a whole? 82 // update state as a whole?
83 - (void)setIcon:(NSImage*)iconImage { 83 - (void)setIcon:(NSImage*)iconImage {
84 [iconImageView_ setImage:iconImage]; 84 [iconImageView_ setImage:iconImage];
85 [iconImageView_ setHidden:!iconImage]; 85 [iconImageView_ setHidden:!iconImage];
86 [iconImageView_ setFrameSize:[[iconImageView_ image] size]]; 86 [iconImageView_ setFrameSize:[[iconImageView_ image] size]];
87 } 87 }
88 88
89 - (void)setSuggestionText:(NSString*)line1 89 - (void)setSuggestionText:(NSString*)line1
90 line2:(NSString*)line2 90 line2:(NSString*)line2 {
91 withFont:(NSFont*)font {
92 [label_ setStringValue:line1]; 91 [label_ setStringValue:line1];
93 [label2_ setStringValue:line2]; 92 [label2_ setStringValue:line2];
94 [label2_ setHidden:![line2 length]]; 93 [label2_ setHidden:![line2 length]];
95 94
96 [label_ sizeToFit]; 95 [label_ sizeToFit];
97 [label2_ sizeToFit]; 96 [label2_ sizeToFit];
98 } 97 }
99 98
100 - (void)showInputField:(NSString*)text withIcon:(NSImage*)icon { 99 - (void)showInputField:(NSString*)text withIcon:(NSImage*)icon {
101 [[inputField_ cell] setPlaceholderString:text]; 100 [[inputField_ cell] setPlaceholderString:text];
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 170 }
172 171
173 [label_ setFrame:labelFrame]; 172 [label_ setFrame:labelFrame];
174 [label2_ setFrameOrigin:NSMakePoint( 173 [label2_ setFrameOrigin:NSMakePoint(
175 0, 174 0,
176 NSMinY(lineFrame) - kAroundTextPadding - NSHeight([label2_ frame]))]; 175 NSMinY(lineFrame) - kAroundTextPadding - NSHeight([label2_ frame]))];
177 [[self view] setFrameSize:preferredContainerSize]; 176 [[self view] setFrameSize:preferredContainerSize];
178 } 177 }
179 178
180 @end 179 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698