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

Unified Diff: views/controls/combobox/native_combobox_views.cc

Issue 8383028: ui/gfx: Convert Canvas::ClipRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 9 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 | « ui/views/widget/native_widget_win.cc ('k') | views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/combobox/native_combobox_views.cc
diff --git a/views/controls/combobox/native_combobox_views.cc b/views/controls/combobox/native_combobox_views.cc
index 44c6838e7aa9f4f61f6615faffef261d8502dc65..5a1176e7d4265a221acff1418c4bdc2cedb6b6d2 100644
--- a/views/controls/combobox/native_combobox_views.cc
+++ b/views/controls/combobox/native_combobox_views.cc
@@ -302,8 +302,7 @@ void NativeComboboxViews::PaintText(gfx::Canvas* canvas) {
gfx::Insets insets = GetInsets();
canvas->Save();
- canvas->ClipRectInt(insets.left(), insets.top(),
- width() - insets.width(), height() - insets.height());
+ canvas->ClipRectInt(GetContentsBounds());
int x = insets.left();
int y = insets.top();
@@ -315,7 +314,7 @@ void NativeComboboxViews::PaintText(gfx::Canvas* canvas) {
index = 0;
string16 text = combobox_->model()->GetItemAt(index);
- const gfx::Font &font = GetFont();
+ const gfx::Font& font = GetFont();
int width = font.GetStringWidth(text);
canvas->DrawStringInt(text, font, text_color, x, y, width, text_height);
« no previous file with comments | « ui/views/widget/native_widget_win.cc ('k') | views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698