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

Unified Diff: ash/common/system/tray/tray_image_item.cc

Issue 2455183002: Simplify layout of tray items and fix spacing for MD. (Closed)
Patch Set: Created 4 years, 2 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/common/system/tray/tray_image_item.cc
diff --git a/ash/common/system/tray/tray_image_item.cc b/ash/common/system/tray/tray_image_item.cc
index 776b38f1ce7688881741cc4f6e14bfad92f71a6f..471a5acd7f4ffd6af9343bd05760edab372a4c95 100644
--- a/ash/common/system/tray/tray_image_item.cc
+++ b/ash/common/system/tray/tray_image_item.cc
@@ -89,7 +89,6 @@ void TrayImageItem::UpdateAfterLoginStatusChange(LoginStatus status) {}
void TrayImageItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {
SetTrayImageItemBorder(tray_view_, alignment);
- SetItemAlignment(alignment);
}
void TrayImageItem::DestroyTrayView() {
@@ -110,15 +109,6 @@ void TrayImageItem::SetImageFromResourceId(int resource_id) {
UpdateImageOnImageView();
}
-void TrayImageItem::SetItemAlignment(ShelfAlignment alignment) {
- // Center the item dependent on the orientation of the shelf.
- views::BoxLayout::Orientation layout = IsHorizontalAlignment(alignment)
- ? views::BoxLayout::kHorizontal
Evan Stade 2016/10/27 19:05:30 use the TrayItemView's fill layout. ImageView alre
tdanderson 2016/10/27 19:28:00 Acknowledged.
- : views::BoxLayout::kVertical;
- tray_view_->SetLayoutManager(new views::BoxLayout(layout, 0, 0, 0));
- tray_view_->Layout();
-}
-
void TrayImageItem::UpdateImageOnImageView() {
if (!tray_view_)
return;

Powered by Google App Engine
This is Rietveld 408576698