summaryrefslogtreecommitdiffstats
path: root/ash/system
diff options
context:
space:
mode:
authormsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-01 21:14:34 +0000
committermsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-01 21:14:34 +0000
commit644f4fba5a0fd2b13ef21e7f76e419ae3dc9db56 (patch)
tree996e6debec24b811c5fb65e86ca1c718e7699ab3 /ash/system
parentf0231a7c7bd34fb880d383f0d26eb85bd10b3dbd (diff)
downloadchromium_src-644f4fba5a0fd2b13ef21e7f76e419ae3dc9db56.zip
chromium_src-644f4fba5a0fd2b13ef21e7f76e419ae3dc9db56.tar.gz
chromium_src-644f4fba5a0fd2b13ef21e7f76e419ae3dc9db56.tar.bz2
Implement the new Views button style.
Add IDRs for the assets landed in http://crrev.com/185350 Set images, alignment colors, shadows, and insets for new STYLE_BUTTON. Add LabelButtonBorder support for [un]focused state painters. Update ButtonExample; toggle focus, use normal colors, etc. See screenshots of Patch Set 4 at: http://crbug.com/155363#c32 BUG=155363 TEST=views_examples_with_content_exe ButtonExample supports new button style (shift-click LabelButton); appearance and behavior meets expectations. R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/12385029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185594 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system')
-rw-r--r--ash/system/logout_button/tray_logout_button.cc6
-rw-r--r--ash/system/tray/tray_views.cc8
-rw-r--r--ash/system/user/tray_user.cc6
3 files changed, 10 insertions, 10 deletions
diff --git a/ash/system/logout_button/tray_logout_button.cc b/ash/system/logout_button/tray_logout_button.cc
index e162347..bd15712 100644
--- a/ash/system/logout_button/tray_logout_button.cc
+++ b/ash/system/logout_button/tray_logout_button.cc
@@ -87,11 +87,11 @@ class LogoutButton : public views::View,
button_->SetFont(button_->GetFont().DeriveFont(1));
views::LabelButtonBorder* border =
new views::LabelButtonBorder(views::Button::STYLE_TEXTBUTTON);
- border->SetPainter(views::Button::STATE_NORMAL,
+ border->SetPainter(false, views::Button::STATE_NORMAL,
views::Painter::CreateImageGridPainter(kLogoutButtonNormalImages));
- border->SetPainter(views::Button::STATE_HOVERED,
+ border->SetPainter(false, views::Button::STATE_HOVERED,
views::Painter::CreateImageGridPainter(kLogoutButtonHotImages));
- border->SetPainter(views::Button::STATE_PRESSED,
+ border->SetPainter(false, views::Button::STATE_PRESSED,
views::Painter::CreateImageGridPainter(kLogoutButtonPushedImages));
button_->set_border(border);
AddChildView(button_);
diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc
index 6e2d292..4b48276 100644
--- a/ash/system/tray/tray_views.cc
+++ b/ash/system/tray/tray_views.cc
@@ -147,16 +147,16 @@ void FixedSizedScrollView::OnPaintFocusBorder(gfx::Canvas* canvas) {
TrayPopupLabelButtonBorder::TrayPopupLabelButtonBorder()
: LabelButtonBorder(views::Button::STYLE_TEXTBUTTON) {
- SetPainter(views::Button::STATE_NORMAL,
+ SetPainter(false, views::Button::STATE_NORMAL,
views::Painter::CreateImageGridPainter(
kTrayPopupLabelButtonBorderImagesNormal));
- SetPainter(views::Button::STATE_DISABLED,
+ SetPainter(false, views::Button::STATE_DISABLED,
views::Painter::CreateImageGridPainter(
kTrayPopupLabelButtonBorderImagesNormal));
- SetPainter(views::Button::STATE_HOVERED,
+ SetPainter(false, views::Button::STATE_HOVERED,
views::Painter::CreateImageGridPainter(
kTrayPopupLabelButtonBorderImagesHovered));
- SetPainter(views::Button::STATE_PRESSED,
+ SetPainter(false, views::Button::STATE_PRESSED,
views::Painter::CreateImageGridPainter(
kTrayPopupLabelButtonBorderImagesHovered));
}
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index 44a093e..c3b2f91 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -487,13 +487,13 @@ void UserView::AddLogoutButton(ash::user::LoginStatus login) {
if (login == ash::user::LOGGED_IN_PUBLIC) {
TrayPopupLabelButtonBorder* border =
static_cast<TrayPopupLabelButtonBorder*>(logout_button_->border());
- border->SetPainter(views::Button::STATE_NORMAL,
+ border->SetPainter(false, views::Button::STATE_NORMAL,
views::Painter::CreateImageGridPainter(
kPublicAccountLogoutButtonBorderImagesNormal));
- border->SetPainter(views::Button::STATE_HOVERED,
+ border->SetPainter(false, views::Button::STATE_HOVERED,
views::Painter::CreateImageGridPainter(
kPublicAccountLogoutButtonBorderImagesHovered));
- border->SetPainter(views::Button::STATE_PRESSED,
+ border->SetPainter(false, views::Button::STATE_PRESSED,
views::Painter::CreateImageGridPainter(
kPublicAccountLogoutButtonBorderImagesHovered));
}