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

Unified Diff: chrome/browser/ui/views/sad_tab_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/sad_tab_view.cc
diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc
index 3082cb97126a4d4c643ab7681b751588468cf737..3076feff51e7f1c598d38273dfa7b6d7f2092c93 100644
--- a/chrome/browser/ui/views/sad_tab_view.cc
+++ b/chrome/browser/ui/views/sad_tab_view.cc
@@ -9,6 +9,7 @@
#include "base/metrics/histogram_macros.h"
#include "build/build_config.h"
#include "chrome/app/vector_icons/vector_icons.h"
+#include "chrome/browser/ui/views/harmony/layout_delegate.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
@@ -79,7 +80,10 @@ SadTabView::SadTabView(content::WebContents* web_contents,
message_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
message_->SetLineHeight(views::kPanelSubVerticalSpacing);
- layout->StartRowWithPadding(0, column_set_id, 0, views::kPanelVertMargin);
+ layout->StartRowWithPadding(
+ 0, column_set_id, 0,
+ LayoutDelegate::Get()->GetMetric(
+ LayoutDelegate::Metric::PANEL_CONTENT_MARGIN));
tapted 2017/02/27 03:24:51 I don't think it makes sense for SadTabView to be
Peter Kasting 2017/02/28 02:21:39 Hmm. I agree this isn't a panel, but I kinda see
Patti Lor 2017/03/03 08:24:39 Had a look through all the metrics in LayoutDelega
Peter Kasting 2017/03/04 02:10:55 Well, "subsection" is supposed to refer to somethi
tapted 2017/03/06 02:20:32 I think this would be derived from BubbleFrameView
layout->AddView(message_, 2, 1, views::GridLayout::LEADING,
views::GridLayout::LEADING);

Powered by Google App Engine
This is Rietveld 408576698