Update corner radius from side panel to page content based on UX feedback.
Bug: 1472983 Change-Id: I1d2096d0dd9316da77c8f033433731a736add22a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4789746 Reviewed-by: Keren Zhu <kerenzhu@chromium.org> Reviewed-by: Darryl James <dljames@chromium.org> Commit-Queue: Caroline Rising <corising@chromium.org> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#1184828}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
3664900a35
commit
78f5b41cca
chrome/browser/ui/views
ui/views/layout
@ -768,7 +768,7 @@ void BrowserViewLayout::LayoutSidePanelView(
|
||||
if (side_panel_rounded_corner_) {
|
||||
const float corner_radius =
|
||||
side_panel_rounded_corner_->GetLayoutProvider()->GetCornerRadiusMetric(
|
||||
views::ShapeContextTokens::kSidePanelContentRadius);
|
||||
views::ShapeContextTokens::kSidePanelPageContentRadius);
|
||||
if (is_container_after_side_panel) {
|
||||
side_panel_rounded_corner_->SetBounds(
|
||||
side_panel_bounds.right(),
|
||||
|
@ -25,7 +25,7 @@ void SidePanelRoundedCorner::Layout() {
|
||||
bool is_right_aligned =
|
||||
browser_view_->unified_side_panel()->IsRightAligned();
|
||||
const float corner_radius = GetLayoutProvider()->GetCornerRadiusMetric(
|
||||
views::ShapeContextTokens::kSidePanelContentRadius);
|
||||
views::ShapeContextTokens::kSidePanelPageContentRadius);
|
||||
const gfx::Rect local_bounds = GetLocalBounds();
|
||||
if (is_right_aligned) {
|
||||
path.moveTo(0, 0);
|
||||
@ -62,7 +62,7 @@ void SidePanelRoundedCorner::OnPaint(gfx::Canvas* canvas) {
|
||||
|
||||
bool is_right_aligned = browser_view_->unified_side_panel()->IsRightAligned();
|
||||
const float corner_radius = GetLayoutProvider()->GetCornerRadiusMetric(
|
||||
views::ShapeContextTokens::kSidePanelContentRadius);
|
||||
views::ShapeContextTokens::kSidePanelPageContentRadius);
|
||||
const gfx::Rect local_bounds = GetLocalBounds();
|
||||
SkPath path;
|
||||
if (is_right_aligned) {
|
||||
|
@ -195,6 +195,8 @@ ShapeSysTokens GetShapeSysToken(ShapeContextTokens id) {
|
||||
{ShapeContextTokens::kTextfieldRadius, ShapeSysTokens::kSmall},
|
||||
{ShapeContextTokens::kSidePanelContentRadius,
|
||||
ShapeSysTokens::kMedium},
|
||||
{ShapeContextTokens::kSidePanelPageContentRadius,
|
||||
ShapeSysTokens::kSmall},
|
||||
});
|
||||
const auto* it = shape_token_map.find(id);
|
||||
return it == shape_token_map.end() ? ShapeSysTokens::kDefault : it->second;
|
||||
|
@ -151,6 +151,7 @@ enum class ShapeContextTokens {
|
||||
kOmniboxExpandedRadius,
|
||||
kTextfieldRadius,
|
||||
kSidePanelContentRadius,
|
||||
kSidePanelPageContentRadius,
|
||||
};
|
||||
|
||||
// ShapeSysTokens are tokens that map to a fixed value that aligns with UX/UI.
|
||||
|
Reference in New Issue
Block a user