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

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

Issue 1422703004: BoxLayout: Added set_collapse_when_hidden(), like views::Label. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@exclusiveaccess-minor-refactor
Patch Set: Created 5 years, 2 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') | ui/views/layout/box_layout.cc » ('J')
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 0a82bb4322c831d09917a94455a33ed2f1717c6a..e3b8ea5b0a7c39c04751f2a4dd61c59299d848da 100644
--- a/ui/views/layout/box_layout.h
+++ b/ui/views/layout/box_layout.h
@@ -81,6 +81,9 @@ class VIEWS_EXPORT BoxLayout : public LayoutManager {
minimum_cross_axis_size_ = size;
}
+ // Sets whether the preferred size is empty when the host is not visible.
+ void set_collapse_when_hidden(bool value) { collapse_when_hidden_ = value; }
+
// Sets the flex weight for the given |view|. Using the preferred size as
// the basis, free space along the main axis is distributed to views in the
// ratio of their flex weights. Similarly, if the views will overflow the
@@ -165,6 +168,9 @@ class VIEWS_EXPORT BoxLayout : public LayoutManager {
// The minimum cross axis size for the layout.
int minimum_cross_axis_size_;
+ // Whether to collapse the host when it's not visible.
+ bool collapse_when_hidden_;
+
// The view that this BoxLayout is managing the layout for.
views::View* host_;
« no previous file with comments | « no previous file | ui/views/layout/box_layout.cc » ('j') | ui/views/layout/box_layout.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698