diff options
-rw-r--r-- | chrome/browser/ui/views/about_chrome_view.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/views/bookmark_editor_view.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/views/clear_browsing_data.cc | 9 | ||||
-rw-r--r-- | chrome/browser/ui/views/clear_browsing_data_view.cc | 6 | ||||
-rw-r--r-- | chrome/browser/ui/views/first_run_bubble.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/views/options/cookies_view.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/views/options/exceptions_view.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/views/options/simple_content_exceptions_view.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/views/task_manager_view.cc | 3 | ||||
-rw-r--r-- | views/layout/layout_constants.h | 10 |
10 files changed, 27 insertions, 18 deletions
diff --git a/chrome/browser/ui/views/about_chrome_view.cc b/chrome/browser/ui/views/about_chrome_view.cc index 5d5a8b6..a1b97aa 100644 --- a/chrome/browser/ui/views/about_chrome_view.cc +++ b/chrome/browser/ui/views/about_chrome_view.cc @@ -396,8 +396,8 @@ void AboutChromeView::Layout() { sz = throbber_->GetPreferredSize(); int throbber_topleft_x = kPanelHorizMargin; - int throbber_topleft_y = parent_bounds.bottom() - sz.height() - - kButtonVEdgeMargin - 3; + int throbber_topleft_y = + parent_bounds.bottom() - sz.height() - views::kButtonVEdgeMargin - 3; throbber_->SetBounds(throbber_topleft_x, throbber_topleft_y, sz.width(), sz.height()); diff --git a/chrome/browser/ui/views/bookmark_editor_view.cc b/chrome/browser/ui/views/bookmark_editor_view.cc index e9372ce..2fedf37 100644 --- a/chrome/browser/ui/views/bookmark_editor_view.cc +++ b/chrome/browser/ui/views/bookmark_editor_view.cc @@ -142,7 +142,7 @@ void BookmarkEditorView::Layout() { gfx::Rect parent_bounds = GetParent()->GetLocalBounds(); gfx::Size prefsize = new_group_button_->GetPreferredSize(); int button_y = - parent_bounds.bottom() - prefsize.height() - kButtonVEdgeMargin; + parent_bounds.bottom() - prefsize.height() - views::kButtonVEdgeMargin; new_group_button_->SetBounds(kPanelHorizMargin, button_y, prefsize.width(), prefsize.height()); } diff --git a/chrome/browser/ui/views/clear_browsing_data.cc b/chrome/browser/ui/views/clear_browsing_data.cc index 1a7a08e..b2b54e0 100644 --- a/chrome/browser/ui/views/clear_browsing_data.cc +++ b/chrome/browser/ui/views/clear_browsing_data.cc @@ -150,8 +150,10 @@ void ClearBrowsingDataView::Init() { // DialogClientView positions the extra view at kButtonHEdgeMargin, but we // put all our controls at kPanelHorizMargin. Add a padding column so things // line up nicely. - if (kPanelHorizMargin - kButtonHEdgeMargin > 0) - column_set->AddPaddingColumn(0, kPanelHorizMargin - kButtonHEdgeMargin); + if (kPanelHorizMargin - views::kButtonHEdgeMargin > 0) { + column_set->AddPaddingColumn( + 0, kPanelHorizMargin - views::kButtonHEdgeMargin); + } column_set->AddColumn(GridLayout::CENTER, GridLayout::CENTER, 0, GridLayout::USE_PREF, 0, 0); column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing); @@ -338,7 +340,8 @@ views::ClientView* ClearBrowsingDataView::CreateClientView( views::View* settings_view = new views::View(); GridLayout* layout = new GridLayout(settings_view); - layout->SetInsets(gfx::Insets(0, kPanelHorizMargin, 0, kButtonHEdgeMargin)); + layout->SetInsets( + gfx::Insets(0, kPanelHorizMargin, 0, views::kButtonHEdgeMargin)); settings_view->SetLayoutManager(layout); views::ColumnSet* column_set = layout->AddColumnSet(0); column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1, diff --git a/chrome/browser/ui/views/clear_browsing_data_view.cc b/chrome/browser/ui/views/clear_browsing_data_view.cc index f3b73fa..adc6529 100644 --- a/chrome/browser/ui/views/clear_browsing_data_view.cc +++ b/chrome/browser/ui/views/clear_browsing_data_view.cc @@ -143,8 +143,10 @@ void ClearBrowsingDataView2::Init() { // DialogClientView positions the extra view at kButtonHEdgeMargin, but we // put all our controls at kPanelHorizMargin. Add a padding column so things // line up nicely. - if (kPanelHorizMargin - kButtonHEdgeMargin > 0) - column_set->AddPaddingColumn(0, kPanelHorizMargin - kButtonHEdgeMargin); + if (kPanelHorizMargin - views::kButtonHEdgeMargin > 0) { + column_set->AddPaddingColumn( + 0, kPanelHorizMargin - views::kButtonHEdgeMargin); + } column_set->AddColumn(GridLayout::CENTER, GridLayout::CENTER, 0, GridLayout::USE_PREF, 0, 0); column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing); diff --git a/chrome/browser/ui/views/first_run_bubble.cc b/chrome/browser/ui/views/first_run_bubble.cc index 6af64bd..8d0277d 100644 --- a/chrome/browser/ui/views/first_run_bubble.cc +++ b/chrome/browser/ui/views/first_run_bubble.cc @@ -193,7 +193,7 @@ void FirstRunBubbleView::Layout() { pref_size = change_button_->GetPreferredSize(); change_button_->SetBounds( canvas.width() - pref_size.width() - kBubblePadding, - canvas.height() - pref_size.height() - kButtonVEdgeMargin, + canvas.height() - pref_size.height() - views::kButtonVEdgeMargin, pref_size.width(), pref_size.height()); pref_size = keep_button_->GetPreferredSize(); diff --git a/chrome/browser/ui/views/options/cookies_view.cc b/chrome/browser/ui/views/options/cookies_view.cc index 0243f92..8454922 100644 --- a/chrome/browser/ui/views/options/cookies_view.cc +++ b/chrome/browser/ui/views/options/cookies_view.cc @@ -178,7 +178,8 @@ void CookiesView::Layout() { // Lay out the Remove/Remove All buttons in the parent view. gfx::Size ps = remove_button_->GetPreferredSize(); gfx::Rect parent_bounds = GetParent()->GetLocalBounds(); - int y_buttons = parent_bounds.bottom() - ps.height() - kButtonVEdgeMargin; + int y_buttons = + parent_bounds.bottom() - ps.height() - views::kButtonVEdgeMargin; remove_button_->SetBounds(kPanelHorizMargin, y_buttons, ps.width(), ps.height()); diff --git a/chrome/browser/ui/views/options/exceptions_view.cc b/chrome/browser/ui/views/options/exceptions_view.cc index 9ddf57ff..e770a3d 100644 --- a/chrome/browser/ui/views/options/exceptions_view.cc +++ b/chrome/browser/ui/views/options/exceptions_view.cc @@ -83,7 +83,8 @@ void ExceptionsView::Layout() { remove_button_, remove_all_button_ }; // The buttons are placed in the parent, but we need to lay them out. - int max_y = GetParent()->GetLocalBounds().bottom() - kButtonVEdgeMargin; + int max_y = + GetParent()->GetLocalBounds().bottom() - views::kButtonVEdgeMargin; int x = kPanelHorizMargin; for (size_t i = 0; i < arraysize(buttons); ++i) { diff --git a/chrome/browser/ui/views/options/simple_content_exceptions_view.cc b/chrome/browser/ui/views/options/simple_content_exceptions_view.cc index 7481135..68c0d3f 100644 --- a/chrome/browser/ui/views/options/simple_content_exceptions_view.cc +++ b/chrome/browser/ui/views/options/simple_content_exceptions_view.cc @@ -69,7 +69,8 @@ void SimpleContentExceptionsView::Layout() { views::NativeButton* buttons[] = { remove_button_, remove_all_button_ }; // The buttons are placed in the parent, but we need to lay them out. - int max_y = GetParent()->GetLocalBounds().bottom() - kButtonVEdgeMargin; + int max_y = + GetParent()->GetLocalBounds().bottom() - views::kButtonVEdgeMargin; int x = kPanelHorizMargin; for (size_t i = 0; i < arraysize(buttons); ++i) { diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc index c7ac51a..104dee4 100644 --- a/chrome/browser/ui/views/task_manager_view.cc +++ b/chrome/browser/ui/views/task_manager_view.cc @@ -519,7 +519,8 @@ void TaskManagerView::Layout() { // y-coordinate of button top left. gfx::Rect parent_bounds = GetParent()->GetLocalBounds(); - int y_buttons = parent_bounds.bottom() - prefered_height - kButtonVEdgeMargin; + int y_buttons = + parent_bounds.bottom() - prefered_height - views::kButtonVEdgeMargin; kill_button_->SetBounds(x() + width() - prefered_width - kPanelHorizMargin, y_buttons, diff --git a/views/layout/layout_constants.h b/views/layout/layout_constants.h index 57abf96..bd90e4e 100644 --- a/views/layout/layout_constants.h +++ b/views/layout/layout_constants.h @@ -53,6 +53,11 @@ 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 the edge of the window and the // top or bottom of a button. const int kButtonVEdgeMargin = 6; @@ -61,11 +66,6 @@ const int kButtonVEdgeMargin = 6; // left or right of a button. const int kButtonHEdgeMargin = 7; -// 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 buttons that are logically related. const int kRelatedButtonHSpacing = 6; |