| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/layout/box_layout.h" | 5 #include "ui/views/layout/box_layout.h" |
| 6 | 6 |
| 7 #include "ui/gfx/rect.h" | 7 #include "ui/gfx/geometry/rect.h" |
| 8 #include "ui/views/view.h" | 8 #include "ui/views/view.h" |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| 11 | 11 |
| 12 BoxLayout::BoxLayout(BoxLayout::Orientation orientation, | 12 BoxLayout::BoxLayout(BoxLayout::Orientation orientation, |
| 13 int inside_border_horizontal_spacing, | 13 int inside_border_horizontal_spacing, |
| 14 int inside_border_vertical_spacing, | 14 int inside_border_vertical_spacing, |
| 15 int between_child_spacing) | 15 int between_child_spacing) |
| 16 : orientation_(orientation), | 16 : orientation_(orientation), |
| 17 inside_border_insets_(inside_border_vertical_spacing, | 17 inside_border_insets_(inside_border_vertical_spacing, |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 child_area_bounds.height() + non_child_size.height()); | 307 child_area_bounds.height() + non_child_size.height()); |
| 308 } | 308 } |
| 309 | 309 |
| 310 gfx::Size BoxLayout::NonChildSize(const View* host) const { | 310 gfx::Size BoxLayout::NonChildSize(const View* host) const { |
| 311 gfx::Insets insets(host->GetInsets()); | 311 gfx::Insets insets(host->GetInsets()); |
| 312 return gfx::Size(insets.width() + inside_border_insets_.width(), | 312 return gfx::Size(insets.width() + inside_border_insets_.width(), |
| 313 insets.height() + inside_border_insets_.height()); | 313 insets.height() + inside_border_insets_.height()); |
| 314 } | 314 } |
| 315 | 315 |
| 316 } // namespace views | 316 } // namespace views |
| OLD | NEW |