diff options
-rw-r--r-- | ash/system/user/tray_user.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc index f433887..de5f7cb 100644 --- a/ash/system/user/tray_user.cc +++ b/ash/system/user/tray_user.cc @@ -432,8 +432,9 @@ void UserView::Layout() { // Give the remaining space to the user card. gfx::Rect user_card_area = contents_area; - user_card_area.set_width(contents_area.width() - - (logout_area.width() + kTrayPopupPaddingBetweenItems)); + int remaining_width = contents_area.width() - + (logout_area.width() + kTrayPopupPaddingBetweenItems); + user_card_area.set_width(std::max(0, remaining_width)); user_card_->SetBoundsRect(user_card_area); } else if (user_card_) { user_card_->SetBoundsRect(contents_area); |