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

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: missed a merge problem 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 3ce1ae3a683a69da0e90477abc0fc6d632d03840..096946743524c9a3a7fd0a2a06d39b687845308c 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -1102,6 +1102,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.
@@ -1112,10 +1115,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;
@@ -1560,7 +1559,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());
@@ -1678,10 +1678,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