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

Unified Diff: views/box_layout.cc

Issue 3108029: Display an infobar when content settings were created. (Closed)
Patch Set: updates Created 10 years, 4 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 | « views/box_layout.h ('k') | views/box_layout_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/box_layout.cc
diff --git a/views/box_layout.cc b/views/box_layout.cc
index 84fb096987daf5447aba757caea16bf503626170..adb192fb16f154fd38590c4600eb7a2442c157aa 100644
--- a/views/box_layout.cc
+++ b/views/box_layout.cc
@@ -7,17 +7,20 @@
namespace views {
BoxLayout::BoxLayout(BoxLayout::Orientation orientation,
- int inside_border_spacing,
+ int inside_border_horizontal_spacing,
+ int inside_border_vertical_spacing,
int between_child_spacing)
: orientation_(orientation),
- inside_border_spacing_(inside_border_spacing),
+ inside_border_horizontal_spacing_(inside_border_horizontal_spacing),
+ inside_border_vertical_spacing_(inside_border_vertical_spacing),
between_child_spacing_(between_child_spacing) {
}
void BoxLayout::Layout(View* host) {
gfx::Rect childArea(gfx::Rect(host->size()));
childArea.Inset(host->GetInsets());
- childArea.Inset(inside_border_spacing_, inside_border_spacing_);
+ childArea.Inset(inside_border_horizontal_spacing_,
+ inside_border_vertical_spacing_);
int x = childArea.x();
int y = childArea.y();
for (int i = 0; i < host->GetChildViewCount(); ++i) {
@@ -58,9 +61,9 @@ gfx::Size BoxLayout::GetPreferredSize(View* host) {
}
}
gfx::Insets insets(host->GetInsets());
- return
- gfx::Size(bounds.width() + insets.width() + 2 * inside_border_spacing_,
- bounds.height() + insets.height() + 2 * inside_border_spacing_);
+ return gfx::Size(
+ bounds.width() + insets.width() + 2 * inside_border_horizontal_spacing_,
+ bounds.height() + insets.height() + 2 * inside_border_vertical_spacing_);
}
} // namespace views
« no previous file with comments | « views/box_layout.h ('k') | views/box_layout_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698