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

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

Issue 2934503002: Remove references to ui/views/layout/layout_constants.h (Closed)
Patch Set: Created 3 years, 6 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/uninstall_view.cc ('k') | ui/views/layout/layout_provider.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 9ec6b09b7679dc9d8f850b5c75da11d4393db446..b5db556a7bdfe268568960673e43fcfeed2e7e89 100644
--- a/ui/views/examples/dialog_example.cc
+++ b/ui/views/examples/dialog_example.cc
@@ -131,9 +131,9 @@ void DialogExample::CreateExampleView(View* container) {
const float kFixed = 0.f;
const float kStretchy = 1.f;
+ views::LayoutProvider* provider = views::LayoutProvider::Get();
const int horizontal_spacing =
- views::LayoutProvider::Get()->GetDistanceMetric(
- views::DISTANCE_RELATED_BUTTON_HORIZONTAL);
+ provider->GetDistanceMetric(views::DISTANCE_RELATED_BUTTON_HORIZONTAL);
GridLayout* layout = GridLayout::CreatePanel(container);
container->SetLayoutManager(layout);
ColumnSet* column_set = layout->AddColumnSet(kFieldsColumnId);
@@ -172,8 +172,9 @@ void DialogExample::CreateExampleView(View* container) {
column_set = layout->AddColumnSet(kButtonsColumnId);
column_set->AddColumn(GridLayout::CENTER, GridLayout::CENTER, kStretchy,
GridLayout::USE_PREF, 0, 0);
- layout->StartRowWithPadding(kFixed, kButtonsColumnId, kFixed,
- kUnrelatedControlVerticalSpacing);
+ layout->StartRowWithPadding(
+ kFixed, kButtonsColumnId, kFixed,
+ provider->GetDistanceMetric(views::DISTANCE_UNRELATED_CONTROL_VERTICAL));
show_ =
MdTextButton::CreateSecondaryUiButton(this, base::ASCIIToUTF16("Show"));
layout->AddView(show_);
« no previous file with comments | « chrome/browser/ui/views/uninstall_view.cc ('k') | ui/views/layout/layout_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698