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

Unified Diff: ui/views/examples/dialog_example.cc

Issue 2696263002: Refactor ViewsDelegate and MD-ify the icon-to-text spacing for checkbox and radiobutton (Closed)
Patch Set: Merged with latest changes. 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: ui/views/examples/dialog_example.cc
diff --git a/ui/views/examples/dialog_example.cc b/ui/views/examples/dialog_example.cc
index 637c6dafabb1957002431d3e709998ed9e4c4af4..7c80d378a9a81296eaf440a7f620572369c755b8 100644
--- a/ui/views/examples/dialog_example.cc
+++ b/ui/views/examples/dialog_example.cc
@@ -131,8 +131,8 @@ void DialogExample::CreateExampleView(View* container) {
const float kFixed = 0.f;
const float kStretchy = 1.f;
- const int horizontal_spacing =
- ViewsDelegate::GetInstance()->GetDialogRelatedButtonHorizontalSpacing();
+ const int horizontal_spacing = ViewsDelegate::GetInstance()->GetSpacingMetric(
+ views::SpacingMetric::RELATED_HORIZONTAL_BUTTON);
GridLayout* layout = GridLayout::CreatePanel(container);
container->SetLayoutManager(layout);
ColumnSet* column_set = layout->AddColumnSet(kFieldsColumnId);
@@ -187,7 +187,8 @@ void DialogExample::StartRowWithLabel(GridLayout* layout, const char* label) {
const float kFixedVerticalResize = 0.f;
layout->StartRowWithPadding(
kFixedVerticalResize, kFieldsColumnId, kFixedVerticalResize,
- ViewsDelegate::GetInstance()->GetDialogRelatedControlVerticalSpacing());
+ ViewsDelegate::GetInstance()->GetSpacingMetric(
+ views::SpacingMetric::RELATED_VERTICAL_CONTROL));
layout->AddView(new Label(base::ASCIIToUTF16(label)));
}

Powered by Google App Engine
This is Rietveld 408576698