| Index: ash/common/system/tray/tray_popup_utils.cc
|
| diff --git a/ash/common/system/tray/tray_popup_utils.cc b/ash/common/system/tray/tray_popup_utils.cc
|
| index 828932685f48d8250e1fb94566aaaa5ae48f4453..536df0a05cb7f7ad17e7ee277543e245087b71b1 100644
|
| --- a/ash/common/system/tray/tray_popup_utils.cc
|
| +++ b/ash/common/system/tray/tray_popup_utils.cc
|
| @@ -86,22 +86,22 @@ void ConfigureDefaultSizeAndFlex(TriView* tri_view,
|
| int min_width = 0;
|
| switch (container) {
|
| case TriView::Container::START:
|
| - min_width = GetTrayConstant(TRAY_POPUP_ITEM_MIN_START_WIDTH);
|
| + min_width = kTrayPopupItemMinStartWidth;
|
| break;
|
| case TriView::Container::CENTER:
|
| tri_view->SetFlexForContainer(TriView::Container::CENTER, 1.f);
|
| break;
|
| case TriView::Container::END:
|
| - min_width = GetTrayConstant(TRAY_POPUP_ITEM_MIN_END_WIDTH);
|
| + min_width = kTrayPopupItemMinEndWidth;
|
| break;
|
| }
|
|
|
| - tri_view->SetMinSize(
|
| + tri_view->SetMinSize(container,
|
| + gfx::Size(min_width, kTrayPopupItemMinHeight));
|
| + constexpr int kTrayPopupItemMaxHeight = 144;
|
| + tri_view->SetMaxSize(
|
| container,
|
| - gfx::Size(min_width, GetTrayConstant(TRAY_POPUP_ITEM_MIN_HEIGHT)));
|
| - tri_view->SetMaxSize(container,
|
| - gfx::Size(SizeRangeLayout::kAbsoluteMaxSize,
|
| - GetTrayConstant(TRAY_POPUP_ITEM_MAX_HEIGHT)));
|
| + gfx::Size(SizeRangeLayout::kAbsoluteMaxSize, kTrayPopupItemMaxHeight));
|
| }
|
|
|
| class BorderlessLabelButton : public views::LabelButton {
|
| @@ -183,8 +183,7 @@ TriView* TrayPopupUtils::CreateSubHeaderRowView() {
|
| TriView* TrayPopupUtils::CreateMultiTargetRowView() {
|
| TriView* tri_view = new TriView(0 /* padding_between_items */);
|
|
|
| - tri_view->SetInsets(
|
| - gfx::Insets(0, GetTrayConstant(TRAY_POPUP_ITEM_LEFT_INSET), 0, 0));
|
| + tri_view->SetInsets(gfx::Insets(0, kMenuExtraMarginFromLeftEdge, 0, 0));
|
|
|
| ConfigureDefaultSizeAndFlex(tri_view, TriView::Container::START);
|
| ConfigureDefaultSizeAndFlex(tri_view, TriView::Container::CENTER);
|
| @@ -215,15 +214,13 @@ views::Label* TrayPopupUtils::CreateDefaultLabel() {
|
| }
|
|
|
| views::ImageView* TrayPopupUtils::CreateMainImageView() {
|
| - return new FixedSizedImageView(
|
| - GetTrayConstant(TRAY_POPUP_ITEM_MAIN_IMAGE_CONTAINER_WIDTH),
|
| - GetTrayConstant(TRAY_POPUP_ITEM_MIN_HEIGHT));
|
| + return new FixedSizedImageView(kTrayPopupItemMinStartWidth,
|
| + kTrayPopupItemMinHeight);
|
| }
|
|
|
| views::ImageView* TrayPopupUtils::CreateMoreImageView() {
|
| views::ImageView* image =
|
| - new FixedSizedImageView(GetTrayConstant(TRAY_POPUP_ITEM_MORE_IMAGE_SIZE),
|
| - GetTrayConstant(TRAY_POPUP_ITEM_MORE_IMAGE_SIZE));
|
| + new FixedSizedImageView(kMenuIconSize, kMenuIconSize);
|
| image->EnableCanvasFlippingForRTLUI(true);
|
| return image;
|
| }
|
|
|