From df0f6e8f05dcab26f0e53bda494cb0d22ae315d0 Mon Sep 17 00:00:00 2001 From: "jochen@chromium.org" Date: Fri, 20 Aug 2010 21:35:32 +0000 Subject: 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 --- views/box_layout.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'views/box_layout.cc') 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 -- cgit v1.1