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

Unified Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc

Issue 2713803002: Views/Harmony: Use LayoutDelegate::GetMetric for views::kPanelVertMargin. (Closed)
Patch Set: Fix many crashes. Created 3 years, 10 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/website_settings/website_settings_popup_view.cc
diff --git a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
index afd6fe99263041f45d549314517808a09f20c987..e7e77d41f7e299eb1be47ce64ff888948a39c7d3 100644
--- a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
+++ b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
@@ -22,6 +22,7 @@
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/views/collected_cookies_views.h"
+#include "chrome/browser/ui/views/harmony/layout_delegate.h"
#include "chrome/browser/ui/views/website_settings/chosen_object_row.h"
#include "chrome/browser/ui/views/website_settings/non_accessible_image_view.h"
#include "chrome/browser/ui/views/website_settings/permission_selector_row.h"
@@ -54,7 +55,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/layout/layout_manager.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
@@ -81,7 +81,6 @@ const int kMaxPopupWidth = 1000;
// Margin and padding values for the |PopupHeaderView|.
const int kHeaderMarginBottom = 10;
-const int kHeaderPaddingBottom = views::kPanelVertMargin;
// Spacing between labels in the header.
const int kHeaderLabelSpacing = 4;
@@ -214,7 +213,9 @@ PopupHeaderView::PopupHeaderView(
layout->AddView(reset_decisions_label_container_, 1, 1,
views::GridLayout::FILL, views::GridLayout::LEADING);
- layout->AddPaddingRow(1, kHeaderPaddingBottom);
+ layout->AddPaddingRow(1,
tapted 2017/02/27 03:24:51 This may have been coincidence too.. I think we sh
Peter Kasting 2017/02/28 02:21:39 I don't have a strong opinion on this one. It see
Patti Lor 2017/03/03 08:24:39 Done.
Patti Lor 2017/03/03 08:24:39 Acknowledged.
+ LayoutDelegate::Get()->GetMetric(
+ LayoutDelegate::Metric::PANEL_CONTENT_MARGIN));
}
PopupHeaderView::~PopupHeaderView() {}
@@ -439,7 +440,9 @@ WebsiteSettingsPopupView::WebsiteSettingsPopupView(
// In non-material, titles are inset from the dialog margin. Ensure the
// horizontal insets match.
set_title_margins(
- gfx::Insets(views::kPanelVertMargin, side_margin, 0, side_margin));
+ gfx::Insets(LayoutDelegate::Get()->GetMetric(
+ LayoutDelegate::Metric::PANEL_CONTENT_MARGIN),
tapted 2017/02/27 03:24:51 This only affects non-material, so I'm not sure it
Peter Kasting 2017/02/28 02:21:39 I'm fine with changing this anyway, because the go
Patti Lor 2017/03/03 08:24:39 Acknowledged, left as is.
+ side_margin, 0, side_margin));
}
views::BubbleDialogDelegateView::CreateBubble(this);

Powered by Google App Engine
This is Rietveld 408576698