Skip to content

Commit

Permalink
Revert "Use gfx::Insets[F]::TLBR() and gfx::Insets[F]::VH() in the re…
Browse files Browse the repository at this point in the history
…st of Chrome"

This reverts commit 4816065.

Reason for revert: Failing on chromeos-octopus-chrome

https://ci.chromium.org/ui/p/chrome/builders/ci/chromeos-octopus-chrome/7700/overview

Original change's description:
> Use gfx::Insets[F]::TLBR() and gfx::Insets[F]::VH() in the rest of Chrome
>
> And remove the multi-parameter constructors of gfx::Insets[F].
>
> Bug: 1302500
> Change-Id: If84ea1437a55d8b74ef1fe02280453870e537d8c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3520461
> Reviewed-by: Scott Violet <sky@chromium.org>
> Owners-Override: Scott Violet <sky@chromium.org>
> Commit-Queue: Scott Violet <sky@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#986043}

Bug: 1302500
Change-Id: Ia2ce31c870f6193d2b4fc6797b78c023dca08705
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3556014
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Owners-Override: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/main@{#986059}
  • Loading branch information
speednoisemovement authored and Chromium LUCI CQ committed Mar 28, 2022
1 parent deca4af commit cf41785
Show file tree
Hide file tree
Showing 128 changed files with 619 additions and 500 deletions.
8 changes: 6 additions & 2 deletions apps/ui/views/app_window_frame_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,12 @@ int AppWindowFrameView::NonClientHitTest(const gfx::Point& point) {
return HTCLIENT;

gfx::Rect expanded_bounds = bounds();
if (resize_outside_bounds_size_)
expanded_bounds.Outset(resize_outside_bounds_size_);
if (resize_outside_bounds_size_) {
expanded_bounds.Inset(gfx::Insets(-resize_outside_bounds_size_,
-resize_outside_bounds_size_,
-resize_outside_bounds_size_,
-resize_outside_bounds_size_));
}
// Points outside the (possibly expanded) bounds can be discarded.
if (!expanded_bounds.Contains(point))
return HTNOWHERE;
Expand Down
4 changes: 2 additions & 2 deletions ash/app_list/views/apps_container_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ AppsContainerView::AppsContainerView(ContentsView* contents_view)
// Initially set the vertical inset to kRegularSeparatorVerticalInset. The
// value will be updated in `AppsContainerView::UpdateAppListConfig()`
separator_->SetProperty(views::kMarginsKey,
gfx::Insets::VH(kRegularSeparatorVerticalInset, 0));
gfx::Insets(kRegularSeparatorVerticalInset, 0));
separator_->SetPaintToLayer();
separator_->layer()->SetFillsBoundsOpaquely(false);
// Visibility for `separator_` will be managed by the `continue_container_`.
Expand Down Expand Up @@ -395,7 +395,7 @@ void AppsContainerView::UpdateAppListConfig(const gfx::Rect& contents_bounds) {
? kRegularSeparatorVerticalInset
: kDenseSeparatorVerticalInset;
separator_->SetProperty(views::kMarginsKey,
gfx::Insets::VH(separator_vertical_inset, 0));
gfx::Insets(separator_vertical_inset, 0));
}

apps_grid_view()->UpdateAppListConfig(app_list_config_.get());
Expand Down
2 changes: 1 addition & 1 deletion ash/login/ui/lock_contents_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ LockContentsView::LockContentsView(
system_info_ = top_header_->AddChildView(std::make_unique<views::View>());
auto* system_info_layout =
system_info_->SetLayoutManager(std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kVertical, gfx::Insets::VH(6, 8)));
views::BoxLayout::Orientation::kVertical, gfx::Insets(6, 8)));
system_info_layout->set_cross_axis_alignment(
views::BoxLayout::CrossAxisAlignment::kEnd);
system_info_->SetVisible(false);
Expand Down
6 changes: 3 additions & 3 deletions ash/login/ui/lock_screen_media_controls_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ namespace {
constexpr size_t kMaxActions = 5;

// Dimensions.
constexpr gfx::Insets kMediaControlsInsets = gfx::Insets(16);
constexpr gfx::Insets kMediaControlsInsets = gfx::Insets(16, 16, 16, 16);
constexpr int kMediaControlsCornerRadius = 16;
constexpr int kMinimumSourceIconSize = 16;
constexpr int kDesiredSourceIconSize = 20;
constexpr int kMinimumArtworkSize = 30;
constexpr int kDesiredArtworkSize = 48;
constexpr int kArtworkRowPadding = 16;
constexpr auto kArtworkRowInsets = gfx::Insets::TLBR(24, 0, 9, 0);
constexpr gfx::Insets kArtworkRowInsets = gfx::Insets(24, 0, 9, 0);
constexpr gfx::Size kArtworkRowPreferredSize =
gfx::Size(328, kDesiredArtworkSize);
constexpr int kMediaButtonRowPadding = 16;
constexpr auto kButtonRowInsets = gfx::Insets::TLBR(4, 0, 0, 0);
constexpr gfx::Insets kButtonRowInsets = gfx::Insets(4, 0, 0, 0);
constexpr int kPlayPauseIconSize = 40;
constexpr int kMediaControlsIconSize = 24;
constexpr gfx::Size kPlayPauseButtonSize = gfx::Size(72, 72);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ void EditModeExitView::Init(gfx::Point position) {
DCHECK(display_overlay_controller_);
SetLayoutManager(std::make_unique<views::FlexLayout>())
->SetOrientation(views::LayoutOrientation::kVertical)
.SetDefault(views::kMarginsKey, gfx::Insets::VH(kSpaceRow, 0));
.SetDefault(views::kMarginsKey, gfx::Insets(
/*vertical=*/kSpaceRow,
/*horizontal=*/0));
SetBackground(views::CreateSolidBackground(SK_ColorTRANSPARENT));
SetSize(gfx::Size(kMenuWidth, kMenuHeight));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ void DownloadBubbleSecurityView::AddHeader() {
.WithWeight(1));
const int icon_label_spacing = ChromeLayoutProvider::Get()->GetDistanceMetric(
views::DISTANCE_RELATED_LABEL_HORIZONTAL);
title->SetProperty(views::kMarginsKey,
gfx::Insets::VH(0, icon_label_spacing));
title->SetProperty(views::kMarginsKey, gfx::Insets(0, icon_label_spacing));
title->SetHorizontalAlignment(gfx::ALIGN_LEFT);

auto* close_button =
Expand Down Expand Up @@ -106,8 +105,7 @@ void DownloadBubbleSecurityView::AddIconAndText(
wrapper->SetLayoutManager(std::make_unique<views::FlexLayout>())
->SetOrientation(views::LayoutOrientation::kVertical)
.SetCrossAxisAlignment(views::LayoutAlignment::kStart);
wrapper->SetProperty(views::kMarginsKey,
gfx::Insets::VH(0, icon_label_spacing));
wrapper->SetProperty(views::kMarginsKey, gfx::Insets(0, icon_label_spacing));
wrapper->SetProperty(views::kCrossAxisAlignmentKey,
views::LayoutAlignment::kStretch);
wrapper->SetProperty(
Expand Down Expand Up @@ -145,9 +143,9 @@ void DownloadBubbleSecurityView::AddIconAndText(
checkbox_->SetMultiLine(true);
checkbox_->SetProperty(
views::kMarginsKey,
gfx::Insets::VH(ChromeLayoutProvider::Get()->GetDistanceMetric(
views::DISTANCE_RELATED_CONTROL_VERTICAL),
0));
gfx::Insets(ChromeLayoutProvider::Get()->GetDistanceMetric(
views::DISTANCE_RELATED_CONTROL_VERTICAL),
0));
checkbox_->SetProperty(views::kCrossAxisAlignmentKey,
views::LayoutAlignment::kStretch);
checkbox_->SetProperty(
Expand Down Expand Up @@ -187,8 +185,8 @@ void DownloadBubbleSecurityView::AddButtons(
info.first_button_label));
first_button_->SetProperty(
views::kMarginsKey,
gfx::Insets::VH(0, ChromeLayoutProvider::Get()->GetDistanceMetric(
views::DISTANCE_RELATED_CONTROL_HORIZONTAL)));
gfx::Insets(0, ChromeLayoutProvider::Get()->GetDistanceMetric(
views::DISTANCE_RELATED_CONTROL_HORIZONTAL)));

if (info.has_checkbox) {
first_button_->SetEnabled(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ void SharingHubBubbleViewImpl::PopulateScrollView(
action_list_view->AddChildView(std::make_unique<views::Separator>());
constexpr int kIndent = 16;
constexpr int kPadding = 8;
separator->SetBorder(views::CreateEmptyBorder(
gfx::Insets::TLBR(kPadding, kIndent, 0, kIndent)));
separator->SetBorder(
views::CreateEmptyBorder(gfx::Insets(kPadding, kIndent, 0, kIndent)));

constexpr int kLabelLineHeight = 22;
constexpr int kLabelLinePaddingTop = 8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PinTextfield : public views::Textfield {
views::Textfield::OnThemeChanged();
constexpr int kBottomBorderThickness = 2;
SetBorder(views::CreateSolidSidedBorder(
gfx::Insets::TLBR(0, 0, kBottomBorderThickness, 0),
0, 0, kBottomBorderThickness, 0,
GetColorProvider()->GetColor(kColorWebAuthnPinTextfieldBottomBorder)));
}
};
Expand Down
2 changes: 1 addition & 1 deletion chromecast/browser/webview/web_content_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void WebContentController::ProcessRequest(

case webview::WebviewRequest::kSetInsets:
if (request.has_set_insets()) {
HandleSetInsets(gfx::Insets::TLBR(
HandleSetInsets(gfx::Insets(
request.set_insets().top(), request.set_insets().left(),
request.set_insets().bottom(), request.set_insets().right()));
} else {
Expand Down
7 changes: 4 additions & 3 deletions chromecast/ui/media_overlay_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ MediaOverlayImpl::MediaOverlayImpl(CastWindowManager* window_manager)
auto container_view = std::make_unique<views::View>();
auto layout = std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kVertical,
gfx::Insets::TLBR(0, window_bounds.width() / 4, kVolumePopupBottomInset,
window_bounds.width() / 4),
gfx::Insets(0, window_bounds.width() / 4, kVolumePopupBottomInset,
window_bounds.width() / 4),
0);
layout->set_main_axis_alignment(views::BoxLayout::MainAxisAlignment::kEnd);
layout->set_cross_axis_alignment(
Expand Down Expand Up @@ -115,7 +115,8 @@ void MediaOverlayImpl::AddToast(views::View* container) {
toast_label_->SetBackgroundColor(
color_utils::GetResultingPaintColor(kBackgroundColor, SK_ColorWHITE));
toast_label_->SetBackground(views::CreateSolidBackground(kBackgroundColor));
toast_label_->SetBorder(views::CreateEmptyBorder(kVolumePopupPadding));
toast_label_->SetBorder(
views::CreateEmptyBorder(gfx::Insets(kVolumePopupPadding)));
toast_label_->SetMultiLine(true);

container->AddChildView(toast_label_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,7 @@ void ImmersiveFullscreenController::EnableTouchInsets(bool enable) {
return;

widget_->GetNativeWindow()->targeter()->SetInsets(
{}, gfx::Insets::TLBR(enable ? kImmersiveFullscreenTopEdgeInset : 0, 0, 0,
0));
{}, gfx::Insets(enable ? kImmersiveFullscreenTopEdgeInset : 0, 0, 0, 0));
}

} // namespace chromeos
8 changes: 4 additions & 4 deletions components/exo/client_controlled_shell_surface_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -544,15 +544,15 @@ TEST_F(ClientControlledShellSurfaceTest, Frame) {

// With work area top insets.
display_manager->UpdateWorkAreaOfDisplay(display_id,
gfx::Insets::TLBR(200, 0, 0, 0));
gfx::Insets(200, 0, 0, 0));
shell_surface->SetGeometry(gfx::Rect(0, 0, 800, 368));
surface->Commit();

widget->LayoutRootViewIfNecessary();
EXPECT_TRUE(frame_view->GetFrameEnabled());
EXPECT_EQ(gfx::Rect(0, 200, 800, 400), widget->GetWindowBoundsInScreen());

display_manager->UpdateWorkAreaOfDisplay(display_id, gfx::Insets());
display_manager->UpdateWorkAreaOfDisplay(display_id, gfx::Insets(0, 0, 0, 0));

// AutoHide
surface->SetFrame(SurfaceFrameType::AUTOHIDE);
Expand Down Expand Up @@ -2729,8 +2729,8 @@ TEST_F(ClientControlledShellSurfaceTest, SnappedClientBounds) {
// Clear insets so that it won't affects the bounds.
shell_surface->SetSystemUiVisibility(true);
int64_t display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id();
ash::Shell::Get()->display_manager()->UpdateWorkAreaOfDisplay(display_id,
gfx::Insets());
ash::Shell::Get()->display_manager()->UpdateWorkAreaOfDisplay(
display_id, gfx::Insets(0, 0, 0, 0));

auto* delegate =
TestClientControlledShellSurfaceDelegate::SetUp(shell_surface.get());
Expand Down
2 changes: 1 addition & 1 deletion components/exo/input_method_surface_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEST_F(InputMethodSurfaceTest, SetGeometryShouldIgnoreWorkArea) {

// With work area top insets.
display_manager->UpdateWorkAreaOfDisplay(display_id,
gfx::Insets::TLBR(200, 0, 0, 0));
gfx::Insets(200, 0, 0, 0));

gfx::Size buffer_size(800, 600);
std::unique_ptr<Buffer> buffer(
Expand Down
2 changes: 1 addition & 1 deletion components/exo/wayland/zcr_remote_shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ gfx::Insets GetWorkAreaInsetsInPixel(const display::Display& display,
// way is to use enclosed rect when converting the work area from dp to
// client pixel, but that led to weird buffer size in overlay detection.
// (crbug.com/920650). Investigate if we can fix it and use enclosed rect.
return gfx::Insets::TLBR(
return gfx::Insets(
base::ClampRound(
base::ClampCeil(insets_in_pixel.top() / device_scale_factor) *
device_scale_factor),
Expand Down
10 changes: 4 additions & 6 deletions components/exo/wayland/zcr_remote_shell_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TEST_F(ZcrRemoteShellTest, GetWorkAreaInsetsInPixel) {
gfx::Insets insets = wayland::GetWorkAreaInsetsInPixel(
display, device_scale_factor, display.GetSizeInPixel(),
display.work_area());
EXPECT_EQ(gfx::Insets::TLBR(0, 0, 108, 0).ToString(), insets.ToString());
EXPECT_EQ(gfx::Insets(0, 0, 108, 0).ToString(), insets.ToString());

auto secondary_display = GetSecondaryDisplay();
gfx::Size secondary_size(secondary_display.size());
Expand All @@ -33,8 +33,7 @@ TEST_F(ZcrRemoteShellTest, GetWorkAreaInsetsInPixel) {
gfx::Insets secondary_insets = wayland::GetWorkAreaInsetsInPixel(
secondary_display, device_scale_factor, secondary_size_in_pixel,
secondary_display.work_area());
EXPECT_EQ(gfx::Insets::TLBR(0, 0, 108, 0).ToString(),
secondary_insets.ToString());
EXPECT_EQ(gfx::Insets(0, 0, 108, 0).ToString(), secondary_insets.ToString());

// Stable Insets
auto widget = CreateTestWidget();
Expand All @@ -44,12 +43,11 @@ TEST_F(ZcrRemoteShellTest, GetWorkAreaInsetsInPixel) {
gfx::Insets stable_insets = wayland::GetWorkAreaInsetsInPixel(
display, device_scale_factor, display.GetSizeInPixel(),
wayland::GetStableWorkArea(display));
EXPECT_EQ(gfx::Insets::TLBR(0, 0, 108, 0).ToString(),
stable_insets.ToString());
EXPECT_EQ(gfx::Insets(0, 0, 108, 0).ToString(), stable_insets.ToString());
gfx::Insets secondary_stable_insets = wayland::GetWorkAreaInsetsInPixel(
secondary_display, device_scale_factor, secondary_size_in_pixel,
wayland::GetStableWorkArea(secondary_display));
EXPECT_EQ(gfx::Insets::TLBR(0, 0, 108, 0).ToString(),
EXPECT_EQ(gfx::Insets(0, 0, 108, 0).ToString(),
secondary_stable_insets.ToString());
}

Expand Down
5 changes: 2 additions & 3 deletions components/fullscreen_control/subtle_notification_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void SubtleNotificationView::InstructionView::AddTextSegment(
views::View* key = new views::View;
auto key_name_layout = std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kHorizontal,
gfx::Insets::VH(0, kKeyNamePaddingPx), kKeyNameImageSpacingPx);
gfx::Insets(0, kKeyNamePaddingPx), kKeyNameImageSpacingPx);
key_name_layout->set_minimum_cross_axis_size(
label->GetPreferredSize().height() + kKeyNamePaddingPx * 2);
key->SetLayoutManager(std::move(key_name_layout));
Expand Down Expand Up @@ -197,8 +197,7 @@ SubtleNotificationView::SubtleNotificationView() : instruction_view_(nullptr) {

SetLayoutManager(std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kHorizontal,
gfx::Insets::VH(outer_padding_vert, outer_padding_horiz),
kMiddlePaddingPx));
gfx::Insets(outer_padding_vert, outer_padding_horiz), kMiddlePaddingPx));
}

SubtleNotificationView::~SubtleNotificationView() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ constexpr int kMediaListSeparatorThickness = 2;

std::unique_ptr<views::Border> CreateMediaListSeparatorBorder(SkColor color,
int thickness) {
return views::CreateSolidSidedBorder(gfx::Insets::TLBR(thickness, 0, 0, 0),
color);
return views::CreateSolidSidedBorder(/*top=*/thickness,
/*left=*/0,
/*bottom=*/0,
/*right=*/0, color);
}

} // anonymous namespace
Expand Down
2 changes: 1 addition & 1 deletion components/live_caption/views/caption_bubble.cc
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ void CaptionBubble::Init() {
->SetOrientation(views::LayoutOrientation::kVertical)
.SetMainAxisAlignment(views::LayoutAlignment::kEnd)
.SetCrossAxisAlignment(views::LayoutAlignment::kStretch)
.SetInteriorMargin(gfx::Insets::VH(0, kSidePaddingDip))
.SetInteriorMargin(gfx::Insets(0, kSidePaddingDip))
.SetDefault(
views::kFlexBehaviorKey,
views::FlexSpecification(views::MinimumFlexSizeRule::kPreferred,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ constexpr int kProgressBarHeight = 4;
constexpr int kMinClickHeight = 14;
constexpr int kMaxClickHeight = 24;
constexpr gfx::Size kTimeSpacingSize = gfx::Size(150, 10);
constexpr auto kProgressViewInsets = gfx::Insets::TLBR(15, 0, 0, 0);
constexpr gfx::Insets kProgressViewInsets = gfx::Insets(15, 0, 0, 0);

constexpr int kModernProgressBarHeight = 2;
constexpr auto kModernProgressViewInsets = gfx::Insets::TLBR(8, 0, 8, 0);
constexpr gfx::Insets kModernProgressViewInsets = gfx::Insets(8, 0, 8, 0);

} // namespace

Expand Down
33 changes: 16 additions & 17 deletions components/media_message_center/media_notification_view_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ constexpr double kMediaImageMaxWidthPct = 0.3;
constexpr double kMediaImageMaxWidthExpandedPct = 0.4;
constexpr gfx::Size kMediaButtonSize = gfx::Size(36, 36);
constexpr int kMediaButtonRowSeparator = 0;
constexpr auto kMediaTitleArtistInsets = gfx::Insets::TLBR(8, 8, 0, 8);
constexpr auto kIconlessMediaNotificationHeaderInsets =
gfx::Insets::TLBR(6, 14, 0, 6);
constexpr auto kIconMediaNotificationHeaderInsets =
gfx::Insets::TLBR(6, 0, 0, 6);
constexpr gfx::Insets kMediaTitleArtistInsets = gfx::Insets(8, 8, 0, 8);
constexpr gfx::Insets kIconlessMediaNotificationHeaderInsets =
gfx::Insets(6, 14, 0, 6);
constexpr gfx::Insets kIconMediaNotificationHeaderInsets =
gfx::Insets(6, 0, 0, 6);
constexpr gfx::Size kMediaNotificationButtonRowSize =
gfx::Size(124, kMediaButtonSize.height());
constexpr gfx::Size kPipButtonSeparatorViewSize = gfx::Size(20, 24);
Expand All @@ -63,16 +63,15 @@ constexpr int kCrOSArtistLineHeight = 16;
constexpr int kCrOSMediaButtonRowSeparator = 8;
constexpr int kCrOSHeaderRowSeparator = 16;
constexpr gfx::Size kCrOSMediaButtonSize = gfx::Size(32, 32);
constexpr gfx::Insets kCrOSMediaTitleArtistInsets =
gfx::Insets::TLBR(0, 8, 12, 0);
constexpr gfx::Insets kCrOSMediaTitleArtistInsets = gfx::Insets(0, 8, 12, 0);
constexpr gfx::Size kCrOSMediaNotificationButtonRowSize =
gfx::Size(124, kCrOSMediaButtonSize.height());
constexpr gfx::Size kCrOSPipButtonSeparatorViewSize = gfx::Size(1, 20);
constexpr auto kCrOSHeaderRowInsets = gfx::Insets::TLBR(16, 16, 0, 16);
constexpr auto kCrOSMainRowInsetsWithArtwork =
gfx::Insets::TLBR(12, 8, 16, 111);
constexpr auto kCrOSMainRowInsetsWithoutArtwork =
gfx::Insets::TLBR(12, 8, 16, 16);
constexpr gfx::Insets kCrOSHeaderRowInsets = gfx::Insets(16, 16, 0, 16);
constexpr gfx::Insets kCrOSMainRowInsetsWithArtwork =
gfx::Insets(12, 8, 16, 111);
constexpr gfx::Insets kCrOSMainRowInsetsWithoutArtwork =
gfx::Insets(12, 8, 16, 16);

void RecordMetadataHistogram(MediaNotificationViewImpl::Metadata metadata) {
UMA_HISTOGRAM_ENUMERATION(MediaNotificationViewImpl::kMetadataHistogramName,
Expand Down Expand Up @@ -582,7 +581,7 @@ void MediaNotificationViewImpl::UpdateViewForExpandedState() {
main_row_
->SetLayoutManager(std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kVertical,
gfx::Insets::TLBR(
gfx::Insets(
kDefaultMarginSize, kDefaultMarginSize, kDefaultMarginSize,
has_artwork_
? (notification_width_ * kMediaImageMaxWidthExpandedPct)
Expand All @@ -596,10 +595,10 @@ void MediaNotificationViewImpl::UpdateViewForExpandedState() {
main_row_
->SetLayoutManager(std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kHorizontal,
gfx::Insets::TLBR(
0, kDefaultMarginSize, 14,
has_artwork_ ? (notification_width_ * kMediaImageMaxWidthPct)
: kDefaultMarginSize),
gfx::Insets(0, kDefaultMarginSize, 14,
has_artwork_
? (notification_width_ * kMediaImageMaxWidthPct)
: kDefaultMarginSize),
kDefaultMarginSize, true))
->SetFlexForView(title_artist_row_, 1);
}
Expand Down
Loading

0 comments on commit cf41785

Please sign in to comment.