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

Unified Diff: chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc

Issue 2799163002: Views/Harmony: Remove references to layout constants in c/b/ui/views/sync. (Closed)
Patch Set: 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 | « chrome/browser/ui/views/sync/one_click_signin_dialog_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
diff --git a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
index 838dd7863f74c1493d0e740013f1bda24f5920dc..94d380e5f000cef2b329f1c210c312134ca551ed 100644
--- a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
+++ b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
@@ -33,7 +33,6 @@
#include "ui/views/controls/styled_label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/grid_layout.h"
-#include "ui/views/layout/layout_constants.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_client_view.h"
@@ -194,8 +193,11 @@ void ProfileSigninConfirmationDialogViews::ViewHierarchyChanged(
views::StyledLabel::RangeStyleInfo::CreateForLink());
// Layout the components.
- const int panel_margin = LayoutDelegate::Get()->GetMetric(
- LayoutDelegate::Metric::PANEL_CONTENT_MARGIN);
+ LayoutDelegate* layout_delegate = LayoutDelegate::Get();
+ const int panel_margin =
+ layout_delegate->GetMetric(LayoutDelegate::Metric::PANEL_CONTENT_MARGIN);
+ const int button_margin =
+ layout_delegate->GetMetric(LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN);
views::GridLayout* dialog_layout = new views::GridLayout(this);
dialog_layout->SetInsets(panel_margin, 0, 0, 0);
SetLayoutManager(dialog_layout);
@@ -219,11 +221,11 @@ void ProfileSigninConfirmationDialogViews::ViewHierarchyChanged(
// Use a new column set for the explanation label so we can add padding.
dialog_layout->AddPaddingRow(0.0, panel_margin);
views::ColumnSet* explanation_columns = dialog_layout->AddColumnSet(1);
- explanation_columns->AddPaddingColumn(0.0, views::kButtonHEdgeMarginNew);
+ explanation_columns->AddPaddingColumn(0.0, button_margin);
explanation_columns->AddColumn(
views::GridLayout::FILL, views::GridLayout::FILL, 100,
views::GridLayout::USE_PREF, 0, 0);
- explanation_columns->AddPaddingColumn(0.0, views::kButtonHEdgeMarginNew);
+ explanation_columns->AddPaddingColumn(0.0, button_margin);
Patti Lor 2017/04/06 02:17:19 Not sure if these two should also be |panel_margin
tapted 2017/04/06 03:09:56 |prompt_bar| is the host passed to GridLayout::Cre
Patti Lor 2017/04/06 04:49:58 Done.
dialog_layout->StartRow(0, 1);
const int kPreferredWidth = 440;
dialog_layout->AddView(explanation_label, 1, 1, views::GridLayout::FILL,
« no previous file with comments | « chrome/browser/ui/views/sync/one_click_signin_dialog_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698