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

Unified Diff: ui/views/controls/tree/tree_view_views.cc

Issue 9021046: Pass const gfx::Rect& as the first parameter to FillRect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more fix Created 8 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 | « ui/views/controls/table/table_view_views.cc ('k') | ui/views/examples/native_theme_button_example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/tree/tree_view_views.cc
diff --git a/ui/views/controls/tree/tree_view_views.cc b/ui/views/controls/tree/tree_view_views.cc
index b736637feed5432fd619e4a8990112bb6fba4f4c..b2225c0cfa09584faffba983a4192d0217aa6029 100644
--- a/ui/views/controls/tree/tree_view_views.cc
+++ b/ui/views/controls/tree/tree_view_views.cc
@@ -661,7 +661,7 @@ void TreeView::PaintRow(gfx::Canvas* canvas,
if (base::i18n::IsRTL())
text_bounds.set_x(bounds.x());
if (node == selected_node_) {
- canvas->FillRect(kSelectedBackgroundColor, text_bounds);
+ canvas->FillRect(text_bounds, kSelectedBackgroundColor);
if (HasFocus())
canvas->DrawFocusRect(text_bounds);
}
@@ -688,16 +688,15 @@ void TreeView::PaintExpandControl(gfx::Canvas* canvas,
if (!expanded) {
int delta = base::i18n::IsRTL() ? 1 : -1;
for (int i = 0; i < 4; ++i) {
- canvas->FillRect(kArrowColor,
- gfx::Rect(center_x + delta * (2 - i),
- center_y - (3 - i), 1, (3 - i) * 2 + 1));
+ canvas->FillRect(gfx::Rect(center_x + delta * (2 - i),
+ center_y - (3 - i), 1, (3 - i) * 2 + 1),
+ kArrowColor);
}
} else {
center_y -= 2;
for (int i = 0; i < 4; ++i) {
- canvas->FillRect(kArrowColor,
- gfx::Rect(center_x - (3 - i), center_y + i,
- (3 - i) * 2 + 1, 1));
+ canvas->FillRect(gfx::Rect(center_x - (3 - i), center_y + i,
+ (3 - i) * 2 + 1, 1), kArrowColor);
}
}
}
« no previous file with comments | « ui/views/controls/table/table_view_views.cc ('k') | ui/views/examples/native_theme_button_example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698