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

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

Issue 10809008: Make spacing between uber tray items consistent with UI spec. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
Index: ash/system/ime/tray_ime.cc
diff --git a/ash/system/ime/tray_ime.cc b/ash/system/ime/tray_ime.cc
index 03bf41034db91de69e4f304559cd765cdef26062..c8fce5c3ec4fa739d392d0431ce2f4b49387430f 100644
--- a/ash/system/ime/tray_ime.cc
+++ b/ash/system/ime/tray_ime.cc
@@ -240,6 +240,9 @@ void TrayIME::UpdateTrayLabel(const IMEInfo& current, size_t count) {
tray_label_->label()->SetText(current.short_name);
}
tray_label_->SetVisible(count > 1);
+ SetTrayLabelItemBorder(tray_label_,
+ ash::Shell::GetInstance()->system_tray()->shelf_alignment());
+ tray_label_->Layout();
}
}
@@ -248,8 +251,8 @@ views::View* TrayIME::CreateTrayView(user::LoginStatus status) {
tray_label_ = new TrayItemView;
tray_label_->CreateLabel();
SetupLabelForTray(tray_label_->label());
- tray_label_->label()->set_border(
- views::Border::CreateEmptyBorder(0, 2, 0, 2));
+ UpdateAfterShelfAlignmentChange(
+ ash::Shell::GetInstance()->system_tray()->shelf_alignment());
sadrul 2012/07/19 16:46:28 Looks like this is necessary in all CreateTrayView
jennyz 2012/07/19 18:33:33 Done.
return tray_label_;
}
@@ -298,6 +301,10 @@ void TrayIME::DestroyNotificationView() {
void TrayIME::UpdateAfterLoginStatusChange(user::LoginStatus status) {
}
+void TrayIME::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
+ SetTrayLabelItemBorder(tray_label_, alignment);
sadrul 2012/07/19 16:46:28 This also seems to be necessary for all items. So
jennyz 2012/07/19 18:33:33 This may require some more refactoring, since Syst
+}
+
void TrayIME::OnIMERefresh(bool show_message) {
SystemTrayDelegate* delegate = Shell::GetInstance()->tray_delegate();
IMEInfoList list;

Powered by Google App Engine
This is Rietveld 408576698