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

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: Used ifdef instead of duplicated code for delegate initialization 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
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('k') | ui/views/layout/layout_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/examples/dialog_example.cc
diff --git a/ui/views/examples/dialog_example.cc b/ui/views/examples/dialog_example.cc
index 37e8770ea9aeeb41cc8dfe2b16fd6b94d5aef654..56be1b86283acfd5b3a880fbecb92fb5510a5932 100644
--- a/ui/views/examples/dialog_example.cc
+++ b/ui/views/examples/dialog_example.cc
@@ -132,7 +132,8 @@ void DialogExample::CreateExampleView(View* container) {
const float kStretchy = 1.f;
const int horizontal_spacing =
- ViewsDelegate::GetInstance()->GetDialogRelatedButtonHorizontalSpacing();
+ ViewsDelegate::GetInstance()->GetDistanceMetric(
+ views::DistanceMetric::RELATED_BUTTON_HORIZONTAL);
GridLayout* layout = GridLayout::CreatePanel(container);
container->SetLayoutManager(layout);
ColumnSet* column_set = layout->AddColumnSet(kFieldsColumnId);
@@ -187,7 +188,8 @@ void DialogExample::StartRowWithLabel(GridLayout* layout, const char* label) {
const float kFixedVerticalResize = 0.f;
layout->StartRowWithPadding(
kFixedVerticalResize, kFieldsColumnId, kFixedVerticalResize,
- ViewsDelegate::GetInstance()->GetDialogRelatedControlVerticalSpacing());
+ ViewsDelegate::GetInstance()->GetDistanceMetric(
+ views::DistanceMetric::RELATED_CONTROL_VERTICAL));
layout->AddView(new Label(base::ASCIIToUTF16(label)));
}
« no previous file with comments | « ui/views/controls/button/md_text_button.cc ('k') | ui/views/layout/layout_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698