diff options
Diffstat (limited to 'ui/views/controls/button/image_button.cc')
| -rw-r--r-- | ui/views/controls/button/image_button.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ui/views/controls/button/image_button.cc b/ui/views/controls/button/image_button.cc index 35e4960..729e848 100644 --- a/ui/views/controls/button/image_button.cc +++ b/ui/views/controls/button/image_button.cc @@ -23,7 +23,7 @@ ImageButton::ImageButton(ButtonListener* listener) v_alignment_(ALIGN_TOP), preferred_size_(kDefaultWidth, kDefaultHeight) { // By default, we request that the gfx::Canvas passed to our View::OnPaint() - // implementation is flipped horizontally so that the button's bitmaps are + // implementation is flipped horizontally so that the button's images are // mirrored when the UI directionality is right-to-left. EnableCanvasFlippingForRTLUI(true); } @@ -40,7 +40,7 @@ void ImageButton::SetBackground(SkColor color, const gfx::ImageSkia* image, const gfx::ImageSkia* mask) { if (!image || !mask) { - background_image_.reset(); + background_image_ = gfx::ImageSkia(); return; } @@ -48,9 +48,9 @@ void ImageButton::SetBackground(SkColor color, SkBitmapOperations::CreateButtonBackground(color, *image, *mask); } -void ImageButton::SetOverlayImage(const SkBitmap* image) { +void ImageButton::SetOverlayImage(const gfx::ImageSkia* image) { if (!image) { - overlay_image_.reset(); + overlay_image_ = gfx::ImageSkia(); return; } overlay_image_ = *image; @@ -76,7 +76,7 @@ void ImageButton::OnPaint(gfx::Canvas* canvas) { // Call the base class first to paint any background/borders. View::OnPaint(canvas); - SkBitmap img = GetImageToPaint(); + gfx::ImageSkia img = GetImageToPaint(); if (!img.isNull()) { int x = 0, y = 0; @@ -105,8 +105,8 @@ void ImageButton::OnPaint(gfx::Canvas* canvas) { //////////////////////////////////////////////////////////////////////////////// // ImageButton, protected: -SkBitmap ImageButton::GetImageToPaint() { - SkBitmap img; +gfx::ImageSkia ImageButton::GetImageToPaint() { + gfx::ImageSkia img; if (!images_[BS_HOT].isNull() && hover_animation_->is_animating()) { img = SkBitmapOperations::CreateBlendedBitmap(images_[BS_NORMAL], @@ -134,7 +134,7 @@ void ToggleImageButton::SetToggled(bool toggled) { return; for (int i = 0; i < BS_COUNT; ++i) { - SkBitmap temp = images_[i]; + gfx::ImageSkia temp = images_[i]; images_[i] = alternate_images_[i]; alternate_images_[i] = temp; } |
