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: ui/views/window/frame_background.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/window/dialog_client_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/frame_background.cc
diff --git a/ui/views/window/frame_background.cc b/ui/views/window/frame_background.cc
index 5ea51ccc8da8d7cd728ab0f5668cb695adf4f99b..a76557d40fcbffb4c03c7d696dcb93deb18e5279 100644
--- a/ui/views/window/frame_background.cc
+++ b/ui/views/window/frame_background.cc
@@ -139,8 +139,8 @@ void FrameBackground::PaintMaximized(gfx::Canvas* canvas, View* view) const {
// account for the top_offset, but this is how it worked before.
int theme_frame_bottom = maximized_top_offset_ + theme_bitmap_->height();
if (top_area_height_ > theme_frame_bottom) {
- canvas->FillRect(frame_color_,
- gfx::Rect(0, 0, view->width(), top_area_height_));
+ canvas->FillRect(gfx::Rect(0, 0, view->width(), top_area_height_),
+ frame_color_);
}
int left_offset = 0;
@@ -171,8 +171,8 @@ void FrameBackground::PaintMaximized(gfx::Canvas* canvas, View* view) const {
void FrameBackground::PaintFrameColor(gfx::Canvas* canvas, View* view) const {
// Fill the top area.
- canvas->FillRect(frame_color_,
- gfx::Rect(0, 0, view->width(), top_area_height_));
+ canvas->FillRect(gfx::Rect(0, 0, view->width(), top_area_height_),
+ frame_color_);
// If the window is very short, we're done.
int remaining_height = view->height() - top_area_height_;
@@ -180,14 +180,11 @@ void FrameBackground::PaintFrameColor(gfx::Canvas* canvas, View* view) const {
return;
// Fill down the sides.
- canvas->FillRect(frame_color_,
- gfx::Rect(0, top_area_height_,
- left_edge_->width(), remaining_height));
- canvas->FillRect(frame_color_,
- gfx::Rect(view->width() - right_edge_->width(),
- top_area_height_,
- right_edge_->width(),
- remaining_height));
+ canvas->FillRect(gfx::Rect(0, top_area_height_, left_edge_->width(),
+ remaining_height), frame_color_);
+ canvas->FillRect(gfx::Rect(view->width() - right_edge_->width(),
+ top_area_height_, right_edge_->width(),
+ remaining_height), frame_color_);
// If the window is very narrow, we're done.
int center_width =
@@ -196,11 +193,10 @@ void FrameBackground::PaintFrameColor(gfx::Canvas* canvas, View* view) const {
return;
// Fill the bottom area.
- canvas->FillRect(frame_color_,
- gfx::Rect(left_edge_->width(),
+ canvas->FillRect(gfx::Rect(left_edge_->width(),
view->height() - bottom_edge_->height(),
- center_width,
- bottom_edge_->height()));
+ center_width, bottom_edge_->height()),
+ frame_color_);
}
} // namespace views
« no previous file with comments | « ui/views/window/dialog_client_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698