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

Unified Diff: views/controls/textfield/native_textfield_gtk.cc

Issue 4151012: Prevent needless vertical margin change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/chromeos/login
Patch Set: Created 10 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/native_textfield_gtk.cc
diff --git a/views/controls/textfield/native_textfield_gtk.cc b/views/controls/textfield/native_textfield_gtk.cc
index 2a65fbd71bd1f19f72beb556df5526aaa877fc39..1c8126d0c233d95724408614c8867a7f7dc7392c 100644
--- a/views/controls/textfield/native_textfield_gtk.cc
+++ b/views/controls/textfield/native_textfield_gtk.cc
@@ -299,7 +299,8 @@ void NativeTextfieldGtk::SetHorizontalMargins(int left, int right) {
gtk_text_view_set_left_margin(text_view, left);
gtk_text_view_set_right_margin(text_view, right);
} else {
- GtkBorder border = { left, right, 0, 0 };
+ gfx::Insets insets = GetEntryInnerBorder(GTK_ENTRY(native_view()));
+ GtkBorder border = {left, right, insets.top(), insets.bottom()};
gtk_entry_set_inner_border(GTK_ENTRY(native_view()), &border);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698