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

Unified Diff: chrome/browser/ui/views/uninstall_view.cc

Issue 2867253003: Description: Views/Harmony Remove references to ui/views/layout/layout_constants.h (Closed)
Patch Set: Address comments 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/conflicting_module_view_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/uninstall_view.cc
diff --git a/chrome/browser/ui/views/uninstall_view.cc b/chrome/browser/ui/views/uninstall_view.cc
index 851f46fef9511744ba1887efceeb7fbb60b26dd7..861776d380e56962a8efaa83365b9d7bacec00b0 100644
--- a/chrome/browser/ui/views/uninstall_view.cc
+++ b/chrome/browser/ui/views/uninstall_view.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/lifetime/scoped_keep_alive.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/ui/uninstall_browser_prompt.h"
+#include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
#include "chrome/common/chrome_result_codes.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/installer/util/shell_util.h"
@@ -19,7 +20,6 @@
#include "ui/views/controls/combobox/combobox.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/grid_layout.h"
-#include "ui/views/layout/layout_constants.h"
#include "ui/views/widget/widget.h"
UninstallView::UninstallView(int* user_selection,
@@ -58,12 +58,25 @@ void UninstallView::SetupControls() {
confirm_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
layout->AddView(confirm_label_);
- layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing);
+ ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
+
+ const int checkbox_indent = provider->GetDistanceMetric(
+ DISTANCE_SUBSECTION_HORIZONTAL_INDENT);
+ const int unrelated_vertical_spacing = provider->GetDistanceMetric(
+ DISTANCE_UNRELATED_CONTROL_VERTICAL);
+ const int related_vertical_spacing = provider->GetDistanceMetric(
+ views::DISTANCE_RELATED_CONTROL_VERTICAL);
+ const int related_horizontal_spacing = provider->GetDistanceMetric(
+ views::DISTANCE_RELATED_CONTROL_HORIZONTAL);
+ const int related_vertical_small = provider->GetDistanceMetric(
+ DISTANCE_RELATED_CONTROL_VERTICAL_SMALL);
+
+ layout->AddPaddingRow(0, unrelated_vertical_spacing);
// The "delete profile" check box.
++column_set_id;
column_set = layout->AddColumnSet(column_set_id);
- column_set->AddPaddingColumn(0, views::kCheckboxIndent);
+ column_set->AddPaddingColumn(0, checkbox_indent);
column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, column_set_id);
@@ -80,14 +93,14 @@ void UninstallView::SetupControls() {
browsers_.reset(new BrowsersMap());
ShellUtil::GetRegisteredBrowsers(browsers_.get());
if (!browsers_->empty()) {
- layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
+ layout->AddPaddingRow(0, related_vertical_spacing);
++column_set_id;
column_set = layout->AddColumnSet(column_set_id);
- column_set->AddPaddingColumn(0, views::kCheckboxIndent);
+ column_set->AddPaddingColumn(0, checkbox_indent);
column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
- column_set->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing);
+ column_set->AddPaddingColumn(0, related_horizontal_spacing);
column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, column_set_id);
@@ -101,7 +114,7 @@ void UninstallView::SetupControls() {
}
}
- layout->AddPaddingRow(0, views::kRelatedControlSmallVerticalSpacing);
+ layout->AddPaddingRow(0, related_vertical_small);
}
bool UninstallView::Accept() {
« no previous file with comments | « chrome/browser/ui/views/conflicting_module_view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698