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

Side by Side Diff: ash/system/user/user_card_view.cc

Issue 2099103002: Give Ash material design tray items the correct size and layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split shelf and tray constants Created 4 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 unified diff | Download patch
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | ash/system/user/user_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/user/user_card_view.h" 5 #include "ash/system/user/user_card_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/login_status.h" 10 #include "ash/common/login_status.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 #else 426 #else
427 AddChildView(user_email); 427 AddChildView(user_email);
428 #endif 428 #endif
429 } 429 }
430 } 430 }
431 } 431 }
432 432
433 views::View* UserCardView::CreateIcon(LoginStatus login_status, 433 views::View* UserCardView::CreateIcon(LoginStatus login_status,
434 int user_index) { 434 int user_index) {
435 RoundedImageView* icon = 435 RoundedImageView* icon =
436 new RoundedImageView(kTrayAvatarCornerRadius, user_index == 0); 436 new RoundedImageView(kTrayRoundedBorderRadius, user_index == 0);
437 if (login_status == LoginStatus::GUEST) { 437 if (login_status == LoginStatus::GUEST) {
438 icon->SetImage(*ui::ResourceBundle::GetSharedInstance() 438 icon->SetImage(*ui::ResourceBundle::GetSharedInstance()
439 .GetImageNamed(IDR_AURA_UBER_TRAY_GUEST_ICON) 439 .GetImageNamed(IDR_AURA_UBER_TRAY_GUEST_ICON)
440 .ToImageSkia(), 440 .ToImageSkia(),
441 gfx::Size(kTrayAvatarSize, kTrayAvatarSize)); 441 gfx::Size(kTrayItemSize, kTrayItemSize));
442 } else { 442 } else {
443 SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate(); 443 SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate();
444 icon->SetImage(delegate->GetUserInfo(user_index)->GetImage(), 444 icon->SetImage(delegate->GetUserInfo(user_index)->GetImage(),
445 gfx::Size(kTrayAvatarSize, kTrayAvatarSize)); 445 gfx::Size(kTrayItemSize, kTrayItemSize));
446 } 446 }
447 return icon; 447 return icon;
448 } 448 }
449 449
450 } // namespace tray 450 } // namespace tray
451 } // namespace ash 451 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/user/tray_user.cc ('k') | ash/system/user/user_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698