| Index: views/controls/button/image_button.cc
|
| diff --git a/views/controls/button/image_button.cc b/views/controls/button/image_button.cc
|
| index 612ce8832f48419bfc59607698e30e8430aa47a6..7b35a46e6cf746349794d17e9b5a866174ee13e0 100644
|
| --- a/views/controls/button/image_button.cc
|
| +++ b/views/controls/button/image_button.cc
|
| @@ -64,6 +64,25 @@ gfx::Size ImageButton::GetPreferredSize() {
|
| return preferred_size_;
|
| }
|
|
|
| +////////////////////////////////////////////////////////////////////////////////
|
| +// ImageButton, protected:
|
| +
|
| +SkBitmap ImageButton::GetImageToPaint() {
|
| + SkBitmap img;
|
| +
|
| + if (!images_[BS_HOT].isNull() && hover_animation_->is_animating()) {
|
| + img = SkBitmapOperations::CreateBlendedBitmap(images_[BS_NORMAL],
|
| + images_[BS_HOT], hover_animation_->GetCurrentValue());
|
| + } else {
|
| + img = images_[state_];
|
| + }
|
| +
|
| + return !img.isNull() ? img : images_[BS_NORMAL];
|
| +}
|
| +
|
| +////////////////////////////////////////////////////////////////////////////////
|
| +// ImageButton, View overrides, protected:
|
| +
|
| void ImageButton::OnPaint(gfx::Canvas* canvas) {
|
| // Call the base class first to paint any background/borders.
|
| View::OnPaint(canvas);
|
| @@ -91,22 +110,6 @@ void ImageButton::OnPaint(gfx::Canvas* canvas) {
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| -// ImageButton, protected:
|
| -
|
| -SkBitmap ImageButton::GetImageToPaint() {
|
| - SkBitmap img;
|
| -
|
| - if (!images_[BS_HOT].isNull() && hover_animation_->is_animating()) {
|
| - img = SkBitmapOperations::CreateBlendedBitmap(images_[BS_NORMAL],
|
| - images_[BS_HOT], hover_animation_->GetCurrentValue());
|
| - } else {
|
| - img = images_[state_];
|
| - }
|
| -
|
| - return !img.isNull() ? img : images_[BS_NORMAL];
|
| -}
|
| -
|
| -////////////////////////////////////////////////////////////////////////////////
|
| // ToggleImageButton, public:
|
|
|
| ToggleImageButton::ToggleImageButton(ButtonListener* listener)
|
|
|