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

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

Issue 2713803002: Views/Harmony: Use LayoutDelegate::GetMetric for views::kPanelVertMargin. (Closed)
Patch Set: Rebase. Created 3 years, 9 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/sad_tab_view.cc ('k') | chrome/browser/ui/views/task_manager_view.cc » ('j') | 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 774b60956331a6c48eb75ee6e8197a70b75ba1d7..054cf522acc0e63a39f6c550cd708f059eb38adf 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
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/views/harmony/layout_delegate.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
@@ -193,8 +194,10 @@ void ProfileSigninConfirmationDialogViews::ViewHierarchyChanged(
views::StyledLabel::RangeStyleInfo::CreateForLink());
// Layout the components.
+ const int panel_margin = LayoutDelegate::Get()->GetMetric(
+ LayoutDelegate::Metric::PANEL_CONTENT_MARGIN);
views::GridLayout* dialog_layout = new views::GridLayout(this);
- dialog_layout->SetInsets(views::kPanelVertMargin, 0, 0, 0);
+ dialog_layout->SetInsets(panel_margin, 0, 0, 0);
SetLayoutManager(dialog_layout);
// Use GridLayout inside the prompt bar because StyledLabel requires it.
@@ -215,7 +218,7 @@ void ProfileSigninConfirmationDialogViews::ViewHierarchyChanged(
views::GridLayout::FILL, views::GridLayout::FILL, 0, 0);
// Use a new column set for the explanation label so we can add padding.
- dialog_layout->AddPaddingRow(0.0, views::kPanelVertMargin);
+ dialog_layout->AddPaddingRow(0.0, panel_margin);
views::ColumnSet* explanation_columns = dialog_layout->AddColumnSet(1);
explanation_columns->AddPaddingColumn(0.0, views::kButtonHEdgeMarginNew);
explanation_columns->AddColumn(
« no previous file with comments | « chrome/browser/ui/views/sad_tab_view.cc ('k') | chrome/browser/ui/views/task_manager_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698