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

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: Review comments. 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 | « no previous file | chrome/browser/ui/views/extensions/extension_install_dialog_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bbe258d463593b0d5f07bfd21d58400223236df5 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,14 @@ BookmarkAppConfirmationView::BookmarkAppConfirmationView(
callback_(callback),
open_as_window_checkbox_(nullptr),
title_tf_(nullptr) {
+ LayoutDelegate* layout_delegate = LayoutDelegate::Get();
+ // Align the contents with the dialog buttons.
views::BoxLayout* layout = new views::BoxLayout(
- views::BoxLayout::kHorizontal, views::kButtonHEdgeMarginNew,
- views::kButtonHEdgeMarginNew, views::kButtonHEdgeMarginNew);
+ views::BoxLayout::kHorizontal,
+ layout_delegate->GetMetric(LayoutDelegate::Metric::DIALOG_BUTTON_MARGIN),
+ layout_delegate->GetMetric(LayoutDelegate::Metric::PANEL_CONTENT_MARGIN),
+ layout_delegate->GetMetric(
+ LayoutDelegate::Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE));
layout->set_cross_axis_alignment(
views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER);
SetLayoutManager(layout);
« no previous file with comments | « no previous file | chrome/browser/ui/views/extensions/extension_install_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698