summaryrefslogtreecommitdiffstats
path: root/views/box_layout.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-20 21:35:32 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-20 21:35:32 +0000
commitdf0f6e8f05dcab26f0e53bda494cb0d22ae315d0 (patch)
tree117d1fc17719bff500b9f2c2552789dc23d83ebb /views/box_layout.cc
parent706dbc20653f11019797dcb2bdfee2e9e83b0fba (diff)
downloadchromium_src-df0f6e8f05dcab26f0e53bda494cb0d22ae315d0.zip
chromium_src-df0f6e8f05dcab26f0e53bda494cb0d22ae315d0.tar.gz
chromium_src-df0f6e8f05dcab26f0e53bda494cb0d22ae315d0.tar.bz2
Display an infobar when content settings were created.
The xib changes add a gradient view with an icon and a text field that is displayed as infobar. The text field is set to truncate. The blocked cookies label is set to wrap. The various views are connected to the new outlets. win: http://imgur.com/OmTxr.png linux: http://imgur.com/OmTxr mac: http://imgur.com/VbwFp BUG=49826 TEST=unit_tests Review URL: http://codereview.chromium.org/3108029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56913 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/box_layout.cc')
-rw-r--r--views/box_layout.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/views/box_layout.cc b/views/box_layout.cc
index 84fb096..adb192f 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