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

Unified Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 120503005: Merge NativeTextfieldViews into views::Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify Textfield border code. Created 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/autofill/decorated_textfield.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/autofill/autofill_dialog_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
index 3f5e6edac8e605d561423fdccfab9101b1da0edf..2859056d3254ce9714be5f7bb1690f273d9e2281 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
@@ -207,9 +207,9 @@ class SectionRowView : public views::View {
int end_x = bounds.width();
views::View* decorated = child_at(2);
if (decorated->visible()) {
- decorated->SizeToPreferredSize();
- decorated->SetX(bounds.width() - decorated->bounds().width());
- decorated->SetY(bounds.y());
+ const int preferred_width = decorated->GetPreferredSize().width();
+ decorated->SetBounds(bounds.width() - preferred_width, bounds.y(),
+ preferred_width, bounds.height());
end_x = decorated->bounds().x() - kAroundTextPadding;
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/autofill/decorated_textfield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698