diff options
author | dzhioev@chromium.org <dzhioev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-14 15:38:43 +0000 |
---|---|---|
committer | dzhioev@chromium.org <dzhioev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-14 15:38:43 +0000 |
commit | 3d6cd7e720c3caa390ebbec521822d576f94592c (patch) | |
tree | 2a0848f1c0fbf8d7b1bcfa4dcb6c83bff48ef59d /ash/system/ime | |
parent | 61932e9cc9ac9cb593e9fb8a7ded753a9081786e (diff) | |
download | chromium_src-3d6cd7e720c3caa390ebbec521822d576f94592c.zip chromium_src-3d6cd7e720c3caa390ebbec521822d576f94592c.tar.gz chromium_src-3d6cd7e720c3caa390ebbec521822d576f94592c.tar.bz2 |
Do not change IME label in tray before hiding it.
BUG=343650
TEST=manually
Review URL: https://codereview.chromium.org/159903007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251337 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/ime')
-rw-r--r-- | ash/system/ime/tray_ime.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc index 9a3526d..beec2f5 100644 --- a/ash/system/ime/tray_ime.cc +++ b/ash/system/ime/tray_ime.cc @@ -203,13 +203,17 @@ TrayIME::~TrayIME() { void TrayIME::UpdateTrayLabel(const IMEInfo& current, size_t count) { if (tray_label_) { + bool visible = count > 1; + tray_label_->SetVisible(visible); + // Do not change label before hiding because this change is noticeable. + if (!visible) + return; if (current.third_party) { tray_label_->label()->SetText( current.short_name + base::UTF8ToUTF16("*")); } else { tray_label_->label()->SetText(current.short_name); } - tray_label_->SetVisible(count > 1); SetTrayLabelItemBorder(tray_label_, system_tray()->shelf_alignment()); tray_label_->Layout(); } |