diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/message_box_view.cc | 4 | ||||
-rw-r--r-- | views/grid_layout.cc | 17 | ||||
-rw-r--r-- | views/grid_layout.h | 5 | ||||
-rw-r--r-- | views/standard_layout.h | 5 |
4 files changed, 16 insertions, 15 deletions
diff --git a/views/controls/message_box_view.cc b/views/controls/message_box_view.cc index a239a16..2023ca4 100644 --- a/views/controls/message_box_view.cc +++ b/views/controls/message_box_view.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -150,7 +150,7 @@ void MessageBoxView::ResetLayoutManager() { using views::ColumnSet; // Initialize the Grid Layout Manager used for this dialog box. - GridLayout* layout = CreatePanelGridLayout(this); + GridLayout* layout = GridLayout::CreatePanel(this); SetLayoutManager(layout); gfx::Size icon_size; diff --git a/views/grid_layout.cc b/views/grid_layout.cc index 5e685ac..b01247f 100644 --- a/views/grid_layout.cc +++ b/views/grid_layout.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -676,6 +676,14 @@ GridLayout::~GridLayout() { STLDeleteElements(&rows_); } +// static +GridLayout* GridLayout::CreatePanel(View* host) { + GridLayout* layout = new GridLayout(host); + layout->SetInsets(kPanelVertMargin, kPanelHorizMargin, + kPanelVertMargin, kPanelHorizMargin); + return layout; +} + void GridLayout::SetInsets(int top, int left, int bottom, int right) { top_inset_ = top; bottom_inset_ = bottom; @@ -1060,10 +1068,3 @@ ColumnSet* GridLayout::GetLastValidColumnSet() { } } // namespace views - -views::GridLayout* CreatePanelGridLayout(views::View* host) { - views::GridLayout* layout = new views::GridLayout(host); - layout->SetInsets(kPanelVertMargin, kPanelHorizMargin, - kPanelVertMargin, kPanelHorizMargin); - return layout; -} diff --git a/views/grid_layout.h b/views/grid_layout.h index a1574ce..bfbfa64 100644 --- a/views/grid_layout.h +++ b/views/grid_layout.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -105,6 +105,9 @@ class GridLayout : public LayoutManager { explicit GridLayout(View* host); virtual ~GridLayout(); + // Creates a GridLayout with kPanel*Margin insets. + static GridLayout* CreatePanel(View* host); + // Sets the insets. All views are placed relative to these offsets. void SetInsets(int top, int left, int bottom, int right); void SetInsets(const gfx::Insets& insets); diff --git a/views/standard_layout.h b/views/standard_layout.h index 9679289..96d36fe 100644 --- a/views/standard_layout.h +++ b/views/standard_layout.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -67,7 +67,4 @@ const int kButtonHEdgeMargin = 7; // Horizontal spacing between buttons that are logically related. const int kRelatedButtonHSpacing = 6; -// Creates a GridLayout with kPanel*Margin insets. -views::GridLayout* CreatePanelGridLayout(views::View* host); - #endif // VIEWS_STANDARD_LAYOUT_H_ |