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

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

Issue 2928253002: Remove references to ui/views/layout/layout_constants.h (Closed)
Patch Set: git cl format Created 3 years, 6 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/forced_reauthentication_dialog.cc
diff --git a/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.cc b/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.cc
index dcf0c48963f9256bdf536bb7b0eb3ec314b38481..652d5eb6e32d5f0e970eedbce4e9c76ed158fc0c 100644
--- a/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.cc
+++ b/chrome/browser/ui/views/profiles/forced_reauthentication_dialog.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
@@ -27,8 +28,6 @@
#include "ui/views/border.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/layout/grid_layout.h"
-#include "ui/views/layout/layout_constants.h"
-#include "ui/views/layout/layout_provider.h"
#include "ui/views/view.h"
#include "ui/views/window/dialog_client_view.h"
@@ -216,14 +215,20 @@ void ForcedReauthenticationDialog::AddedToWidget() {
dialog_layout->AddView(prompt_label, 1, 1, views::GridLayout::FILL,
views::GridLayout::FILL, 0, 0);
+ ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
+
// 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, provider->GetDistanceMetric(
+ views::DISTANCE_DIALOG_CONTENTS_VERTICAL_MARGIN)));
Peter Kasting 2017/06/10 01:41:37 This doesn't look like the right constant. AFAICT
ananta 2017/06/10 03:36:44 Sent you an email with the image comparing the two
views::ColumnSet* explanation_columns = dialog_layout->AddColumnSet(1);
- explanation_columns->AddPaddingColumn(0.0, views::kButtonHEdgeMarginNew);
+
+ const int padding_column_width = provider->GetDistanceMetric(
+ views::DISTANCE_DIALOG_CONTENTS_HORIZONTAL_MARGIN);
Peter Kasting 2017/06/10 01:41:37 It looks to me like these are the left() and right
ananta 2017/06/10 03:36:44 Thanks done.
+ explanation_columns->AddPaddingColumn(0.0, padding_column_width);
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, padding_column_width);
dialog_layout->StartRow(0, 1);
const int kPreferredWidth = 440;
dialog_layout->AddView(explanation_label, 1, 1, views::GridLayout::FILL,
« chrome/browser/ui/ash/DEPS ('K') | « chrome/browser/ui/views/chrome_cleaner_dialog_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698