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

Unified Diff: chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc

Issue 2753243002: Views/Harmony: Replace layout constants in chrome/browser/ui/views/extensions. (Closed)
Patch Set: Clean up includes. 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
Index: chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc
diff --git a/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc b/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc
index a2d3043363fd73b00732cc491b0aed535701fbdd..c6fb82a37b22746b3e1916c7db5790a64bb8f5ff 100644
--- a/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc
+++ b/chrome/browser/ui/views/extensions/bookmark_app_confirmation_view.cc
@@ -8,6 +8,7 @@
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
+#include "chrome/browser/ui/views/harmony/layout_delegate.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/strings/grit/components_strings.h"
@@ -22,7 +23,6 @@
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/layout_constants.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_client_view.h"
@@ -74,9 +74,11 @@ BookmarkAppConfirmationView::BookmarkAppConfirmationView(
callback_(callback),
open_as_window_checkbox_(nullptr),
title_tf_(nullptr) {
- views::BoxLayout* layout = new views::BoxLayout(
- views::BoxLayout::kHorizontal, views::kButtonHEdgeMarginNew,
- views::kButtonHEdgeMarginNew, views::kButtonHEdgeMarginNew);
+ const int button_margin = LayoutDelegate::Get()->GetMetric(
+ LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN);
+ views::BoxLayout* layout =
+ new views::BoxLayout(views::BoxLayout::kHorizontal, button_margin,
+ button_margin, button_margin);
tapted 2017/03/20 03:41:52 The children here are not buttons :/, but I suppos
Patti Lor 2017/03/21 06:24:29 Done.
layout->set_cross_axis_alignment(
views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER);
SetLayoutManager(layout);

Powered by Google App Engine
This is Rietveld 408576698