Commit 9d74890d authored by Jan Krcal's avatar Jan Krcal Committed by Commit Bot

[User menu] Unify corner radii inside a bubble dialog

This CL changes the corner radius of a colored background inside a
bubble dialog with the corner radius of the bubble itself, as requested
by UX.

Bug: 1099286
Change-Id: I47ade9c26e9ff1321e15c37d27aedeebcca65781
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359085
Commit-Queue: David Roger <droger@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799029}
parent e6d8e184
......@@ -343,6 +343,7 @@ void BuildProfileBackgroundContainer(
views::View* parent,
std::unique_ptr<views::View> heading_label,
base::Optional<SkColor> background_color,
int corner_radius,
std::unique_ptr<views::View> avatar_image_view,
std::unique_ptr<views::View> edit_button) {
constexpr int kExtraMarginInsideProfileBackground = 2;
......@@ -374,8 +375,7 @@ void BuildProfileBackgroundContainer(
profile_background_container->SetBackground(
views::CreateBackgroundFromPainter(
views::Painter::CreateSolidRoundRectPainter(
background_color.value(),
/*radius=*/kDefaultMargin, background_insets)));
background_color.value(), corner_radius, background_insets)));
}
// The |heading_and_image_container| is on the left and it stretches almost
......@@ -588,7 +588,9 @@ void ProfileMenuViewBase::SetProfileIdentityInfo(
BuildProfileBackgroundContainer(
/*parent=*/identity_info_container_, std::move(heading_label),
background_color, std::move(avatar_image_view), std::move(edit_button));
background_color,
GetCornerRadius(), // Use the same radius as the bubble has.
std::move(avatar_image_view), std::move(edit_button));
BuildProfileTitleAndSubtitle(/*parent=*/identity_info_container_, title,
subtitle);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment