Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc |
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
index 395783601cd5ca91555ac46453564043d446bc6a..a202df9d32b27ed7b15d7ee04dc47c61b230ff8a 100644 |
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
@@ -1696,11 +1696,13 @@ views::View* ProfileChooserView::CreateMaterialDesignCurrentProfileView( |
current_profile_name->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
NonInteractiveContainer* profile_name_container = |
new NonInteractiveContainer(); |
- int name_container_v_spacing = views::kRelatedControlVerticalSpacing; |
- if (!avatar_item.signed_in || switches::IsEnableAccountConsistency()) |
- name_container_v_spacing += views::kRelatedControlVerticalSpacing; |
- profile_name_container->SetLayoutManager(new views::BoxLayout( |
- views::BoxLayout::kVertical, 0, name_container_v_spacing, 0)); |
+ int name_container_v_spacing = |
+ std::floor((current_profile_photo->GetPreferredSize().height() - |
sky
2016/08/24 19:40:54
Do you really need the floor here? Don't you get w
Jane
2016/08/24 19:54:34
It's for just in case that the divided value has a
sky
2016/08/24 20:29:12
You're setting this to an int, so it's going to be
Jane
2016/08/24 20:35:17
Oh oops, sorry totally forgot!
|
+ current_profile_name->GetPreferredSize().height()) / |
+ 2); |
+ views::BoxLayout* profile_name_layout = new views::BoxLayout( |
+ views::BoxLayout::kVertical, 0, name_container_v_spacing, 0); |
+ profile_name_container->SetLayoutManager(profile_name_layout); |
profile_name_container->AddChildView(current_profile_name); |
const int between_child_spacing = |
@@ -1738,6 +1740,13 @@ views::View* ProfileChooserView::CreateMaterialDesignCurrentProfileView( |
email_label->SetElideBehavior(gfx::ELIDE_EMAIL); |
email_label->SetEnabled(false); |
email_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
+ name_container_v_spacing = |
+ std::floor((current_profile_photo->GetPreferredSize().height() - |
sky
2016/08/24 19:40:54
Same comment here.
Jane
2016/08/24 20:35:17
Done.
|
+ current_profile_name->GetPreferredSize().height() - |
+ email_label->GetPreferredSize().height()) / |
+ 2); |
+ profile_name_layout->set_inside_border_insets( |
+ gfx::Insets(name_container_v_spacing, 0)); |
profile_name_container->AddChildView(email_label); |
} |
return view; |