diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-08 01:01:36 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-08 01:01:36 +0000 |
commit | d36f141ad941e3602a90e7e6917d31a5ace804b3 (patch) | |
tree | 2809f2671b23d12b98df8bbb747c092c97afc763 /ui/views/controls/scrollbar | |
parent | 5720225ccf919ba3fa7a01d6abbc559af50f746e (diff) | |
download | chromium_src-d36f141ad941e3602a90e7e6917d31a5ace804b3.zip chromium_src-d36f141ad941e3602a90e7e6917d31a5ace804b3.tar.gz chromium_src-d36f141ad941e3602a90e7e6917d31a5ace804b3.tar.bz2 |
ui/gfx: Make the first version of Canvas::TileImageInt take a gfx::Rect.
BUG=100898
R=pkasting@chromium.org
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9332006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/controls/scrollbar')
-rw-r--r-- | ui/views/controls/scrollbar/bitmap_scroll_bar.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc index f0a8db3..b8de236 100644 --- a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc +++ b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -124,8 +124,8 @@ class BitmapScrollBarThumb : public BaseScrollBarThumb { int top_cap_height = start_cap_bitmap()->height(); int bottom_cap_height = end_cap_bitmap()->height(); int thumb_body_height = height() - top_cap_height - bottom_cap_height; - canvas->TileImageInt(*background_bitmap(), 0, top_cap_height, - background_bitmap()->width(), thumb_body_height); + canvas->TileImage(*background_bitmap(), gfx::Rect(0, top_cap_height, + background_bitmap()->width(), thumb_body_height)); canvas->DrawBitmapInt(*end_cap_bitmap(), 0, height() - bottom_cap_height); @@ -292,10 +292,8 @@ void BitmapScrollBar::Layout() { void BitmapScrollBar::OnPaint(gfx::Canvas* canvas) { // Paint the track. - gfx::Rect track_bounds = GetTrackBounds(); - canvas->TileImageInt(*images_[THUMB_TRACK][GetThumbTrackState()], - track_bounds.x(), track_bounds.y(), - track_bounds.width(), track_bounds.height()); + canvas->TileImage(*images_[THUMB_TRACK][GetThumbTrackState()], + GetTrackBounds()); } /////////////////////////////////////////////////////////////////////////////// |