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

Unified Diff: chrome/browser/ui/views/extensions/media_gallery_checkbox_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
Index: chrome/browser/ui/views/extensions/media_gallery_checkbox_view.cc
diff --git a/chrome/browser/ui/views/extensions/media_gallery_checkbox_view.cc b/chrome/browser/ui/views/extensions/media_gallery_checkbox_view.cc
index 9b2fb0732177b21a9f3b64dcc7cc53f337764b00..0f36191be16b6afb8d4a7eb965e3de344f457e0e 100644
--- a/chrome/browser/ui/views/extensions/media_gallery_checkbox_view.cc
+++ b/chrome/browser/ui/views/extensions/media_gallery_checkbox_view.cc
@@ -14,7 +14,6 @@
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
-#include "ui/views/layout/layout_constants.h"
namespace {
@@ -31,8 +30,9 @@ MediaGalleryCheckboxView::MediaGalleryCheckboxView(
DCHECK(button_listener != NULL);
SetLayoutManager(
new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0));
- const int border_horiz_margin = LayoutDelegate::Get()->GetMetric(
- LayoutDelegate::Metric::PANEL_CONTENT_MARGIN);
+ LayoutDelegate* layout_delegate = LayoutDelegate::Get();
+ const int border_horiz_margin =
+ layout_delegate->GetMetric(LayoutDelegate::Metric::PANEL_CONTENT_MARGIN);
SetBorder(views::CreateEmptyBorder(
0, border_horiz_margin, trailing_vertical_space, border_horiz_margin));
if (menu_controller)
@@ -55,7 +55,10 @@ MediaGalleryCheckboxView::MediaGalleryCheckboxView(
secondary_text_->SetElideBehavior(gfx::ELIDE_HEAD);
secondary_text_->SetTooltipText(tooltip_text);
secondary_text_->SetBorder(views::CreateEmptyBorder(
- 0, views::kRelatedControlSmallHorizontalSpacing, 0, 0));
+ 0,
+ layout_delegate->GetMetric(
+ LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING_SMALL),
+ 0, 0));
AddChildView(checkbox_);
AddChildView(secondary_text_);

Powered by Google App Engine
This is Rietveld 408576698