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

Unified Diff: chrome/browser/ui/views/webshare/webshare_target_picker_view.cc

Issue 2888563004: Delete panel metrics and define insets in terms of distance metrics. (Closed)
Patch Set: one wrong conversion Created 3 years, 7 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 | « chrome/browser/ui/views/task_manager_view.cc ('k') | ui/views/layout/grid_layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/webshare/webshare_target_picker_view.cc
diff --git a/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc b/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc
index c24e9584038bb05c15514a26ac3295c91fda4a9c..762417f697edf1b288f338b16e7b5124600cc64e 100644
--- a/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc
+++ b/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc
@@ -81,11 +81,14 @@ WebShareTargetPickerView::WebShareTargetPickerView(
: targets_(targets),
table_model_(base::MakeUnique<TargetPickerTableModel>(&targets_)),
close_callback_(std::move(close_callback)) {
- const int panel_margin = ChromeLayoutProvider::Get()->GetDistanceMetric(
- DISTANCE_PANEL_CONTENT_MARGIN);
- views::BoxLayout* layout =
- new views::BoxLayout(views::BoxLayout::kVertical, panel_margin,
- panel_margin, views::kRelatedControlVerticalSpacing);
+ const ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
+ views::BoxLayout* layout = new views::BoxLayout(
+ views::BoxLayout::kVertical,
+ provider->GetDistanceMetric(
+ views::DISTANCE_BUBBLE_CONTENTS_HORIZONTAL_MARGIN),
+ provider->GetDistanceMetric(
+ views::DISTANCE_BUBBLE_CONTENTS_VERTICAL_MARGIN),
+ provider->GetDistanceMetric(views::DISTANCE_RELATED_CONTROL_VERTICAL));
SetLayoutManager(layout);
views::Label* overview_label = new views::Label(
« no previous file with comments | « chrome/browser/ui/views/task_manager_view.cc ('k') | ui/views/layout/grid_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698