diff options
author | dgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-01 01:17:21 +0000 |
---|---|---|
committer | dgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-01 01:17:21 +0000 |
commit | 8834a3b3a4d52040e9e8436e20fa2dd0536b82a4 (patch) | |
tree | d4689f4bb451f3a306f059cf86978879c41cc38c /ash/system/user | |
parent | 33b0299adb7277ab8f7df93a31a7c745fc915536 (diff) | |
download | chromium_src-8834a3b3a4d52040e9e8436e20fa2dd0536b82a4.zip chromium_src-8834a3b3a4d52040e9e8436e20fa2dd0536b82a4.tar.gz chromium_src-8834a3b3a4d52040e9e8436e20fa2dd0536b82a4.tar.bz2 |
Revert of Ash:Shelf - Cleanup of Alternate Shelf (part 1) (https://codereview.chromium.org/140323010/)
Reason for revert:
Broke Linux ChromiumOS Builder (dbg):
http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Builder%20%28dbg%29/builds/45933/steps/compile/logs/stdio
FAILED: /b/build/goma/gomacc c++ -MMD -MF obj/ash/system/web_notification/ash.web_notification_tray.o.d ....
../../ash/system/web_notification/web_notification_tray.cc: In constructor 'ash::WebNotificationTray::WebNotificationTray(ash::internal::StatusAreaWidget*)':
../../ash/system/web_notification/web_notification_tray.cc:322:7:error: 'UseAlternateShelfLayout' is not a member of 'ash::switches'
../../ui/message_center/message_center_style.h: At global scope:
../../ui/message_center/message_center_style.h:103:15:error: 'message_center::kButtonSeparatorColor' defined but not used [-Werror=unused-variable]
../../ui/message_center/message_center_style.h:104:15:error: 'message_center::kHoveredButtonBackgroundColor' defined but not used [-Werror=unused-variable]
../../ui/message_center/message_center_style.h:111:15:error: 'message_center::kProgressBarBackgroundColor' defined but not used [-Werror=unused-variable]
../../ui/message_center/message_center_style.h:112:15:error: 'message_center::kProgressBarSliceColor' defined but not used [-Werror=unused-variable]
../../ui/message_center/message_center_style.h:43:15:error: 'message_center::settings::kEntrySeparatorColor' defined but not used [-Werror=unused-variable]
Original issue's description:
> Part 1) of cleaning up the code related to the shelf layout, specifically removing all instances of branching related to the 'alternate shelf layout' as this is now the only option.
> Removed the about:flags entry relating to alternate shelf layout.
>
> A patch will follow to simplify the remaining layout code as it is still a bit of a spaghetti like mess.
>
> R=jamescook@chromium.org, skuhne@chromium.org
> TBR=miket@chromium.org
> BUG=338429
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=254301
TBR=jamescook@chromium.org,skuhne@chromium.org,harrym@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=338429
Review URL: https://codereview.chromium.org/185143002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254306 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/user')
-rw-r--r-- | ash/system/user/tray_user.cc | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc index 05aa78b..26f8204 100644 --- a/ash/system/user/tray_user.cc +++ b/ash/system/user/tray_user.cc @@ -1287,7 +1287,7 @@ void TrayUser::UpdateAfterLoginStatusChange(user::LoginStatus status) { label_->SetText(bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_GUEST_LABEL)); } - if (avatar_) { + if (avatar_ && switches::UseAlternateShelfLayout()) { int corner_radius = GetTrayItemRadius(); avatar_->SetCornerRadii(0, corner_radius, corner_radius, 0); avatar_->SetBorder(views::Border::NullBorder()); @@ -1306,13 +1306,21 @@ void TrayUser::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { if (alignment == SHELF_ALIGNMENT_BOTTOM || alignment == SHELF_ALIGNMENT_TOP) { if (avatar_) { - if (multiprofile_index_) { - avatar_->SetBorder( - views::Border::CreateEmptyBorder(0, kTrayLabelSpacing, 0, 0)); + if (switches::UseAlternateShelfLayout()) { + if (multiprofile_index_) { + avatar_->SetBorder( + views::Border::CreateEmptyBorder(0, kTrayLabelSpacing, 0, 0)); + } else { + avatar_->SetBorder(views::Border::NullBorder()); + } + avatar_->SetCornerRadii(0, corner_radius, corner_radius, 0); } else { - avatar_->SetBorder(views::Border::NullBorder()); + avatar_->SetBorder(views::Border::CreateEmptyBorder( + 0, + kTrayImageItemHorizontalPaddingBottomAlignment + 2, + 0, + kTrayImageItemHorizontalPaddingBottomAlignment)); } - avatar_->SetCornerRadii(0, corner_radius, corner_radius, 0); } if (label_) { label_->SetBorder(views::Border::CreateEmptyBorder( @@ -1326,13 +1334,17 @@ void TrayUser::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { 0, 0, kUserLabelToIconPadding)); } else { if (avatar_) { - if (multiprofile_index_) { - avatar_->SetBorder( - views::Border::CreateEmptyBorder(kTrayLabelSpacing, 0, 0, 0)); + if (switches::UseAlternateShelfLayout()) { + if (multiprofile_index_) { + avatar_->SetBorder( + views::Border::CreateEmptyBorder(kTrayLabelSpacing, 0, 0, 0)); + } else { + avatar_->SetBorder(views::Border::NullBorder()); + } + avatar_->SetCornerRadii(0, 0, corner_radius, corner_radius); } else { - avatar_->SetBorder(views::Border::NullBorder()); + SetTrayImageItemBorder(avatar_, alignment); } - avatar_->SetCornerRadii(0, 0, corner_radius, corner_radius); } if (label_) { label_->SetBorder(views::Border::CreateEmptyBorder( @@ -1374,7 +1386,8 @@ void TrayUser::UpdateAvatarImage(user::LoginStatus status) { GetTrayIndex() >= session_state_delegate->NumberOfLoggedInUsers()) return; - int icon_size = kUserIconLargeSize; + int icon_size = switches::UseAlternateShelfLayout() ? + kUserIconLargeSize : kUserIconSize; avatar_->SetImage( Shell::GetInstance()->session_state_delegate()->GetUserImage( |