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

Unified Diff: ash/common/system/user/user_card_view.cc

Issue 2709903004: Consolidate some more ash tray constants. (Closed)
Patch Set: rebase/review Created 3 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 | « ash/common/system/tray/tray_utils.cc ('k') | ash/common/system/user/user_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/user/user_card_view.cc
diff --git a/ash/common/system/user/user_card_view.cc b/ash/common/system/user/user_card_view.cc
index 8d465abceb4c0b9823e814d6638ccc4eb089a397..1e1bd57e75b05b4b94cca2f0cf247ba129773446 100644
--- a/ash/common/system/user/user_card_view.cc
+++ b/ash/common/system/user/user_card_view.cc
@@ -68,10 +68,9 @@ views::View* CreateUserAvatarView(LoginStatus login_status, int user_index) {
gfx::Size(kTrayItemSize, kTrayItemSize));
}
- image_view->SetBorder(views::CreateEmptyBorder(
- gfx::Insets((GetTrayConstant(TRAY_POPUP_ITEM_MAIN_IMAGE_CONTAINER_WIDTH) -
- image_view->GetPreferredSize().width()) /
- 2)));
+ image_view->SetBorder(views::CreateEmptyBorder(gfx::Insets(
+ (kTrayPopupItemMinStartWidth - image_view->GetPreferredSize().width()) /
+ 2)));
return image_view;
}
@@ -296,8 +295,7 @@ UserCardView::UserCardView(LoginStatus login_status,
auto layout = new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0,
kTrayPopupLabelHorizontalPadding);
SetLayoutManager(layout);
- layout->set_minimum_cross_axis_size(
- GetTrayConstant(TRAY_POPUP_ITEM_MIN_HEIGHT));
+ layout->set_minimum_cross_axis_size(kTrayPopupItemMinHeight);
layout->set_cross_axis_alignment(
views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER);
// For active users, the left inset is provided by ActiveUserBorder, which
@@ -455,8 +453,7 @@ void UserCardView::AddUserContent(views::BoxLayout* layout,
media_capture_icon_ = new views::ImageView;
media_capture_icon_->SetImage(
gfx::CreateVectorIcon(kSystemTrayRecordingIcon, gfx::kGoogleRed700));
- const int media_capture_width =
- GetTrayConstant(TRAY_POPUP_ITEM_MIN_END_WIDTH);
+ const int media_capture_width = kTrayPopupItemMinEndWidth;
media_capture_icon_->SetBorder(views::CreateEmptyBorder(
gfx::Insets(0, (media_capture_width -
media_capture_icon_->GetPreferredSize().width()) /
« no previous file with comments | « ash/common/system/tray/tray_utils.cc ('k') | ash/common/system/user/user_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698