diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 16:25:56 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 16:25:56 +0000 |
commit | fca8dc0de7785069b2bb721aca6966fd11f45a0a (patch) | |
tree | c3f01985bec47ab376b00710abf20184f1110f22 /ash/wm/frame_painter.cc | |
parent | e212a306bfbdaac64b4e1a5134dd42b7a0d773af (diff) | |
download | chromium_src-fca8dc0de7785069b2bb721aca6966fd11f45a0a.zip chromium_src-fca8dc0de7785069b2bb721aca6966fd11f45a0a.tar.gz chromium_src-fca8dc0de7785069b2bb721aca6966fd11f45a0a.tar.bz2 |
views: Improve the constant names of the ButtonState enum.
We rename then to STATE_FOO, so it is less confusing:
Rather than:
if (state == views::CustomButton::BS_HOT) { ... }
We now have:
if (state == views::CustomButton::STATE_HOVERED) { ... }
A bit more verbose, but much better to read.
R=sky@chromium.org
TBR=jochen@chromium.org # for content/shell
Review URL: https://chromiumcodereview.appspot.com/11275272
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/frame_painter.cc')
-rw-r--r-- | ash/wm/frame_painter.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc index 1ccd992..a4b4c70 100644 --- a/ash/wm/frame_painter.cc +++ b/ash/wm/frame_painter.cc @@ -694,11 +694,11 @@ void FramePainter::SetButtonImages(views::ImageButton* button, int hot_image_id, int pushed_image_id) { ui::ThemeProvider* theme_provider = frame_->GetThemeProvider(); - button->SetImage(views::CustomButton::BS_NORMAL, + button->SetImage(views::CustomButton::STATE_NORMAL, theme_provider->GetImageSkiaNamed(normal_image_id)); - button->SetImage(views::CustomButton::BS_HOT, + button->SetImage(views::CustomButton::STATE_HOVERED, theme_provider->GetImageSkiaNamed(hot_image_id)); - button->SetImage(views::CustomButton::BS_PUSHED, + button->SetImage(views::CustomButton::STATE_PRESSED, theme_provider->GetImageSkiaNamed(pushed_image_id)); } |