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

Unified Diff: ui/views/layout/box_layout.h

Issue 12575005: make BoxLayout use and respect GetHeightForWidth(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: BoxLayout::GetPreferredHeightForWidth Created 7 years, 9 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 | « no previous file | ui/views/layout/box_layout.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/layout/box_layout.h
diff --git a/ui/views/layout/box_layout.h b/ui/views/layout/box_layout.h
index b592cc6a33c3f84b17b9a5835452f81e4bc0034d..7670d8cb05e7bd15b59771b2e95c3ade65aabf84 100644
--- a/ui/views/layout/box_layout.h
+++ b/ui/views/layout/box_layout.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "ui/gfx/insets.h"
#include "ui/views/layout/layout_manager.h"
namespace gfx {
@@ -46,13 +47,20 @@ class VIEWS_EXPORT BoxLayout : public LayoutManager {
// Overridden from views::LayoutManager:
virtual void Layout(View* host) OVERRIDE;
virtual gfx::Size GetPreferredSize(View* host) OVERRIDE;
+ virtual int GetPreferredHeightForWidth(View* host, int width) OVERRIDE;
private:
+ // The preferred size for the dialog given the width of the child area.
+ gfx::Size GetPreferredSizeForChildWidth(View* host, int child_area_width);
+
+ // The amount of space the layout requires in addition to any space for the
+ // child views.
+ gfx::Size NonChildSize(View* host);
+
const Orientation orientation_;
// Spacing between child views and host view border.
- const int inside_border_horizontal_spacing_;
- const int inside_border_vertical_spacing_;
+ gfx::Insets inside_border_insets_;
// Spacing to put in between child views.
const int between_child_spacing_;
« no previous file with comments | « no previous file | ui/views/layout/box_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698