summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 23:17:49 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-09 23:17:49 +0000
commit6e472da04f540d7837b7a344383869013bc57a3d (patch)
treec67dd1a65eee9d5174c4bfdd269f6bdc2acac430 /views
parent0189514260039b943294ede22d1056928a766fd1 (diff)
downloadchromium_src-6e472da04f540d7837b7a344383869013bc57a3d.zip
chromium_src-6e472da04f540d7837b7a344383869013bc57a3d.tar.gz
chromium_src-6e472da04f540d7837b7a344383869013bc57a3d.tar.bz2
views: Move more layout constants to the views namespace. Part 2.
The other constants will be moved in future patches. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6458014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74372 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/message_box_view.cc10
-rw-r--r--views/layout/layout_constants.h20
2 files changed, 15 insertions, 15 deletions
diff --git a/views/controls/message_box_view.cc b/views/controls/message_box_view.cc
index 50ac7af..cf2d8e1 100644
--- a/views/controls/message_box_view.cc
+++ b/views/controls/message_box_view.cc
@@ -166,7 +166,7 @@ void MessageBoxView::ResetLayoutManager() {
column_set->AddColumn(GridLayout::LEADING, GridLayout::LEADING, 0,
GridLayout::FIXED, icon_size.width(),
icon_size.height());
- column_set->AddPaddingColumn(0, kUnrelatedControlHorizontalSpacing);
+ column_set->AddPaddingColumn(0, views::kUnrelatedControlHorizontalSpacing);
}
column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
GridLayout::FIXED, message_width_, 0);
@@ -176,8 +176,8 @@ void MessageBoxView::ResetLayoutManager() {
if (prompt_field_) {
column_set = layout->AddColumnSet(textfield_column_view_set_id);
if (icon_) {
- column_set->AddPaddingColumn(0,
- icon_size.width() + kUnrelatedControlHorizontalSpacing);
+ column_set->AddPaddingColumn(
+ 0, icon_size.width() + views::kUnrelatedControlHorizontalSpacing);
}
column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
GridLayout::USE_PREF, 0, 0);
@@ -188,8 +188,8 @@ void MessageBoxView::ResetLayoutManager() {
if (checkbox_) {
column_set = layout->AddColumnSet(checkbox_column_view_set_id);
if (icon_) {
- column_set->AddPaddingColumn(0,
- icon_size.width() + kUnrelatedControlHorizontalSpacing);
+ column_set->AddPaddingColumn(
+ 0, icon_size.width() + views::kUnrelatedControlHorizontalSpacing);
}
column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
GridLayout::USE_PREF, 0, 0);
diff --git a/views/layout/layout_constants.h b/views/layout/layout_constants.h
index bd90e4e..b322965 100644
--- a/views/layout/layout_constants.h
+++ b/views/layout/layout_constants.h
@@ -35,28 +35,28 @@ const int kRelatedControlVerticalSpacing = 8;
// Small vertical spacing between controls that are logically related.
const int kRelatedControlSmallVerticalSpacing = 4;
-// Vertical spacing between controls that are logically unrelated.
-const int kUnrelatedControlVerticalSpacing = 20;
-
-// Larger vertical spacing between unrelated controls.
-const int kUnrelatedControlLargeVerticalSpacing = 30;
-
// Small horizontal spacing between controls that are logically related.
const int kRelatedControlSmallHorizontalSpacing = 8;
// Horizontal spacing between controls that are logically related.
const int kRelatedControlHorizontalSpacing = 8;
+// TODO(tfarina): Move this namespace to the top of this file around of all
+// these constants. But this needs to be done in small steps, as it's
+// impossible to convert everything at the same time.
+namespace views {
+
// Horizontal spacing between controls that are logically unrelated.
const int kUnrelatedControlHorizontalSpacing = 12;
// Larger horizontal spacing between unrelated controls.
const int kUnrelatedControlLargeHorizontalSpacing = 20;
-// TODO(tfarina): Move this namespace to the top of this file around of all
-// these constants. But this needs to be done in small steps, as it's
-// impossible to convert everything at the same time.
-namespace views {
+// Vertical spacing between controls that are logically unrelated.
+const int kUnrelatedControlVerticalSpacing = 20;
+
+// Larger vertical spacing between unrelated controls.
+const int kUnrelatedControlLargeVerticalSpacing = 30;
// Vertical spacing between the edge of the window and the
// top or bottom of a button.