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

Unified Diff: chrome/browser/ui/views/detachable_toolbar_view.cc

Issue 8405002: ui/gfx: Convert Canvas::FillRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: save some vertical space, interactive_ui_tests are fixed by Peter's fix 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
Index: chrome/browser/ui/views/detachable_toolbar_view.cc
diff --git a/chrome/browser/ui/views/detachable_toolbar_view.cc b/chrome/browser/ui/views/detachable_toolbar_view.cc
index 60c09e00b21b11874f69521b3e3f3016291dcbe2..b7b31cce990cbb8461a3b0068e0ca73255fe1a52 100644
--- a/chrome/browser/ui/views/detachable_toolbar_view.cc
+++ b/chrome/browser/ui/views/detachable_toolbar_view.cc
@@ -28,10 +28,8 @@ void DetachableToolbarView::PaintBackgroundAttachedMode(
views::View* view,
const gfx::Point& background_origin) {
ui::ThemeProvider* tp = view->GetThemeProvider();
- SkColor theme_toolbar_color =
- tp->GetColor(ThemeService::COLOR_TOOLBAR);
- canvas->FillRectInt(theme_toolbar_color, 0, 0,
- view->width(), view->height());
+ SkColor theme_toolbar_color = tp->GetColor(ThemeService::COLOR_TOOLBAR);
+ canvas->FillRect(theme_toolbar_color, view->GetLocalBounds());
canvas->TileImageInt(*tp->GetBitmapNamed(IDR_THEME_TOOLBAR),
background_origin.x(), background_origin.y(), 0, 0,
view->width(), view->height());
@@ -58,14 +56,16 @@ void DetachableToolbarView::PaintHorizontalBorder(gfx::Canvas* canvas,
// the view (bar/shelf) is attached or detached.
int thickness = views::NonClientFrameView::kClientEdgeThickness;
int y = view->IsDetached() ? 0 : (view->height() - thickness);
- canvas->FillRectInt(ResourceBundle::toolbar_separator_color,
- 0, y, view->width(), thickness);
+ canvas->FillRect(ResourceBundle::toolbar_separator_color,
+ gfx::Rect(0, y, view->width(), thickness));
}
// static
void DetachableToolbarView::PaintContentAreaBackground(
- gfx::Canvas* canvas, ui::ThemeProvider* theme_provider,
- const SkRect& rect, double roundness) {
+ gfx::Canvas* canvas,
+ ui::ThemeProvider* theme_provider,
+ const SkRect& rect,
+ double roundness) {
SkPaint paint;
paint.setAntiAlias(true);
paint.setColor(theme_provider->GetColor(ThemeService::COLOR_TOOLBAR));
« no previous file with comments | « chrome/browser/ui/views/default_search_view.cc ('k') | chrome/browser/ui/views/download/download_shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698