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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 2859193004: Remove GridLayout::SetInsets in favor of an empty border on the host. (Closed)
Patch Set: fix compile and tests Created 3 years, 7 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
Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index d1b3b3538405b2b623289b6ac7c43028fc5eb30f..ed6a9f269b621c1a8dba127430f77ddcf6467c9b 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -1107,6 +1107,9 @@ views::View* ProfileChooserView::CreateTutorialView(
views::View* view = new views::View();
view->set_background(views::Background::CreateSolidBackground(
profiles::kAvatarTutorialBackgroundColor));
+ view->SetBorder(views::CreateEmptyBorder(
+ views::kButtonVEdgeMarginNew, views::kButtonHEdgeMarginNew,
+ views::kButtonVEdgeMarginNew, views::kButtonHEdgeMarginNew));
views::GridLayout* layout = CreateSingleColumnLayout(
view, kFixedMenuWidth - 2 * views::kButtonHEdgeMarginNew);
// Creates a second column set for buttons and links.
@@ -1117,10 +1120,6 @@ views::View* ProfileChooserView::CreateTutorialView(
1, views::kUnrelatedControlHorizontalSpacing);
button_columns->AddColumn(views::GridLayout::TRAILING,
views::GridLayout::CENTER, 0, views::GridLayout::USE_PREF, 0, 0);
- layout->SetInsets(views::kButtonVEdgeMarginNew,
- views::kButtonHEdgeMarginNew,
- views::kButtonVEdgeMarginNew,
- views::kButtonHEdgeMarginNew);
// Adds title and close button if needed.
const SkColor kTitleAndButtonTextColor = SK_ColorWHITE;
@@ -1565,7 +1564,8 @@ views::View* ProfileChooserView::CreateSupervisedUserDisclaimerView() {
int horizontal_margin = kMenuEdgeMargin;
views::GridLayout* layout =
CreateSingleColumnLayout(view, kFixedMenuWidth - 2 * horizontal_margin);
- layout->SetInsets(0, horizontal_margin, kMenuEdgeMargin, horizontal_margin);
+ view->SetBorder(views::CreateEmptyBorder(0, horizontal_margin,
+ kMenuEdgeMargin, horizontal_margin));
views::Label* disclaimer = new views::Label(
avatar_menu_->GetSupervisedUserInformation());
@@ -1716,10 +1716,9 @@ views::View* ProfileChooserView::CreateAccountRemovalView() {
views::View* view = new views::View();
views::GridLayout* layout = CreateSingleColumnLayout(
view, kFixedAccountRemovalViewWidth - 2 * views::kButtonHEdgeMarginNew);
- layout->SetInsets(0,
- views::kButtonHEdgeMarginNew,
- views::kButtonVEdgeMarginNew,
- views::kButtonHEdgeMarginNew);
+ view->SetBorder(views::CreateEmptyBorder(0, views::kButtonHEdgeMarginNew,
+ views::kButtonVEdgeMarginNew,
+ views::kButtonHEdgeMarginNew));
const std::string& primary_account = SigninManagerFactory::GetForProfile(
browser_->profile())->GetAuthenticatedAccountId();

Powered by Google App Engine
This is Rietveld 408576698