Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(775)

Unified Diff: ash/system/ime/tray_ime.cc

Issue 159903007: Do not change IME label in tray before hiding it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/ime/tray_ime.cc
diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc
index 9a3526dc380a1f6cf657468d3c9e680f3c0140e2..beec2f5f02f99faeb0b177ff727f6dbc87100820 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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698