diff options
Diffstat (limited to 'ui/views/controls/scrollbar/bitmap_scroll_bar.cc')
| -rw-r--r-- | ui/views/controls/scrollbar/bitmap_scroll_bar.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc index aa614ea..6caaac0 100644 --- a/ui/views/controls/scrollbar/bitmap_scroll_bar.cc +++ b/ui/views/controls/scrollbar/bitmap_scroll_bar.cc @@ -13,10 +13,10 @@ #include "base/utf_string_conversions.h" #include "build/build_config.h" #include "grit/ui_strings.h" -#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/keycodes/keyboard_codes.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/canvas.h" +#include "ui/gfx/image/image_skia.h" #include "ui/views/controls/menu/menu.h" #include "ui/views/controls/scroll_view.h" #include "ui/views/controls/scrollbar/base_scroll_bar_thumb.h" @@ -109,50 +109,50 @@ class BitmapScrollBarThumb : public BaseScrollBarThumb { // View overrides: virtual gfx::Size GetPreferredSize() OVERRIDE { - return gfx::Size(background_bitmap()->width(), - start_cap_bitmap()->height() + - end_cap_bitmap()->height() + - grippy_bitmap()->height()); + return gfx::Size(background_image()->width(), + start_cap_image()->height() + + end_cap_image()->height() + + grippy_image()->height()); } protected: // View overrides: virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { - canvas->DrawBitmapInt(*start_cap_bitmap(), 0, 0); - int top_cap_height = start_cap_bitmap()->height(); - int bottom_cap_height = end_cap_bitmap()->height(); + canvas->DrawBitmapInt(*start_cap_image(), 0, 0); + int top_cap_height = start_cap_image()->height(); + int bottom_cap_height = end_cap_image()->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->DrawBitmapInt(*end_cap_bitmap(), 0, + canvas->TileImageInt(*background_image(), 0, top_cap_height, + background_image()->width(), thumb_body_height); + canvas->DrawBitmapInt(*end_cap_image(), 0, height() - bottom_cap_height); // Paint the grippy over the track. - int grippy_x = (width() - grippy_bitmap()->width()) / 2; - int grippy_y = (thumb_body_height - grippy_bitmap()->height()) / 2; - canvas->DrawBitmapInt(*grippy_bitmap(), grippy_x, grippy_y); + int grippy_x = (width() - grippy_image()->width()) / 2; + int grippy_y = (thumb_body_height - grippy_image()->height()) / 2; + canvas->DrawBitmapInt(*grippy_image(), grippy_x, grippy_y); } private: // Returns the image rendered at the start of the thumb. - gfx::ImageSkia* start_cap_bitmap() const { + gfx::ImageSkia* start_cap_image() const { return scroll_bar_->images_[BitmapScrollBar::THUMB_START_CAP][GetState()]; } // Returns the image rendered at the end of the thumb. - gfx::ImageSkia* end_cap_bitmap() const { + gfx::ImageSkia* end_cap_image() const { return scroll_bar_->images_[BitmapScrollBar::THUMB_END_CAP][GetState()]; } // Returns the image that is tiled in the background of the thumb between // the start and the end caps. - gfx::ImageSkia* background_bitmap() const { + gfx::ImageSkia* background_image() const { return scroll_bar_->images_[BitmapScrollBar::THUMB_MIDDLE][GetState()]; } // Returns the image that is rendered in the middle of the thumb - // transparently over the background bitmap. - gfx::ImageSkia* grippy_bitmap() const { + // transparently over the background image. + gfx::ImageSkia* grippy_image() const { return scroll_bar_->images_[BitmapScrollBar::THUMB_GRIPPY] [CustomButton::BS_NORMAL]; } @@ -265,7 +265,7 @@ void BitmapScrollBar::Layout() { // Preserve the height/width of the thumb (depending on orientation) as set // by the last call to |Update|, but coerce the width/height to be the - // appropriate value for the bitmaps provided. + // appropriate value for the images provided. if (IsHorizontal()) { thumb->SetBounds(thumb->x(), thumb->y(), thumb->width(), thumb_prefsize.height()); |
