diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-16 18:27:58 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-16 18:27:58 +0000 |
commit | 10ec1a840108398f1177ecc66f5acf0f452c5b23 (patch) | |
tree | 5864932aa41d7bd0fc0d26687384e6fa5922d104 /ash | |
parent | 527d50f8451a0d88b3f0430b0cf41a9693d2149b (diff) | |
download | chromium_src-10ec1a840108398f1177ecc66f5acf0f452c5b23.zip chromium_src-10ec1a840108398f1177ecc66f5acf0f452c5b23.tar.gz chromium_src-10ec1a840108398f1177ecc66f5acf0f452c5b23.tar.bz2 |
Update launcher status images
BUG=141572
TEST=None
Review URL: https://chromiumcodereview.appspot.com/10823351
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151924 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/launcher/launcher_button.cc | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/ash/launcher/launcher_button.cc b/ash/launcher/launcher_button.cc index ce6dcbe..cc154c0 100644 --- a/ash/launcher/launcher_button.cc +++ b/ash/launcher/launcher_button.cc @@ -34,11 +34,9 @@ const int kBarSize = 3; const int kBarSpacing = 5; const int kIconSize = 32; const int kHopSpacing = 2; -const int kActiveBarColor = 0xe6ffffff; -const int kInactiveBarColor = 0x80ffffff; -const int kHopUpMS = 200; +const int kHopUpMS = 0; const int kHopDownMS = 200; -const int kAttentionThrobDurationMS = 2000; +const int kAttentionThrobDurationMS = 1000; bool ShouldHop(int state) { return state & ash::internal::LauncherButton::STATE_HOVERED || @@ -466,22 +464,26 @@ void LauncherButton::UpdateState() { if (state_ == STATE_NORMAL || state_ & STATE_PENDING) { bar_->SetVisible(false); } else { - ResourceBundle& rb = ResourceBundle::GetSharedInstance(); int bar_id; - bar_->SetVisible(true); - - if (state_ & STATE_ACTIVE || state_ & STATE_ATTENTION) { - bar_id = IsShelfHorizontal() ? IDR_AURA_LAUNCHER_UNDERLINE_ACTIVE : - IDR_AURA_LAUNCHER_UNDERLINE_VERTICAL_ACTIVE; - } else if (state_ & STATE_HOVERED || state_ & STATE_FOCUSED) { - bar_id = IsShelfHorizontal() ? IDR_AURA_LAUNCHER_UNDERLINE_HOVER : - IDR_AURA_LAUNCHER_UNDERLINE_VERTICAL_HOVER; + if (IsShelfHorizontal()) { + if (state_ & (STATE_HOVERED | STATE_FOCUSED | STATE_ATTENTION)) + bar_id = IDR_AURA_LAUNCHER_UNDERLINE_HOVER; + else if (state_ & STATE_ACTIVE) + bar_id = IDR_AURA_LAUNCHER_UNDERLINE_ACTIVE; + else + bar_id = IDR_AURA_LAUNCHER_UNDERLINE_RUNNING; } else { - bar_id = IsShelfHorizontal() ? IDR_AURA_LAUNCHER_UNDERLINE_RUNNING : - IDR_AURA_LAUNCHER_UNDERLINE_VERTICAL_RUNNING; + if (state_ & (STATE_HOVERED | STATE_FOCUSED | STATE_ATTENTION)) + bar_id = IDR_AURA_LAUNCHER_UNDERLINE_VERTICAL_HOVER; + else if (state_ & STATE_ACTIVE) + bar_id = IDR_AURA_LAUNCHER_UNDERLINE_VERTICAL_ACTIVE; + else + bar_id = IDR_AURA_LAUNCHER_UNDERLINE_VERTICAL_RUNNING; } + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); bar_->SetImage(rb.GetImageNamed(bar_id).ToImageSkia()); + bar_->SetVisible(true); } switch (host_->GetShelfAlignment()) { |