Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6601)

Unified Diff: chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc

Issue 2800723003: Fix body alignment for the desktop iOS promotion Bubble. (Closed)
Patch Set: use insets Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc
diff --git a/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc
index 99b46c85d11ce2a48cf702e29058a48ecc52b20b..47e050d0da5e8092c5ccfadd0c9818fd998035f0 100644
--- a/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc
+++ b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc
@@ -28,6 +28,15 @@ DesktopIOSPromotionBubbleView::DesktopIOSPromotionBubbleView(
int bubble_width = ManagePasswordsBubbleView::kDesiredBubbleWidth;
views::GridLayout* layout = new views::GridLayout(this);
layout->set_minimum_size(gfx::Size(bubble_width, 0));
+ layout->SetInsets(
+ 0,
+ LayoutDelegate::Get()->GetMetric(
+ LayoutDelegate::Metric::PANEL_CONTENT_MARGIN) +
+ desktop_ios_promotion::GetPromoImage(
+ GetNativeTheme()->GetSystemColor(
+ ui::NativeTheme::kColorId_TextfieldDefaultColor))
+ .width(),
+ 0, 0);
SetLayoutManager(layout);
send_sms_button_ = views::MdTextButton::CreateSecondaryUiBlueButton(
this, l10n_util::GetStringUTF16(IDS_DESKTOP_TO_IOS_PROMO_SEND_TO_PHONE));
@@ -35,19 +44,8 @@ DesktopIOSPromotionBubbleView::DesktopIOSPromotionBubbleView(
this, l10n_util::GetStringUTF16(IDS_DESKTOP_TO_IOS_PROMO_NO_THANKS));
constexpr int kLabelColumnSet = 1;
views::ColumnSet* column_set = layout->AddColumnSet(kLabelColumnSet);
- column_set->AddPaddingColumn(
- 0, LayoutDelegate::Get()->GetMetric(
- LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN) +
- desktop_ios_promotion::GetPromoImage(
- GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_TextfieldDefaultColor))
- .width() +
- LayoutDelegate::Get()->GetMetric(
- LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING));
-
column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 0,
views::GridLayout::FIXED, bubble_width, 0);
-
constexpr int kDoubleButtonColumnSet = 2;
column_set = layout->AddColumnSet(kDoubleButtonColumnSet);
column_set->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698