diff options
author | calamity@chromium.org <calamity@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 07:05:42 +0000 |
---|---|---|
committer | calamity@chromium.org <calamity@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 07:05:42 +0000 |
commit | 9cfa1257745fbec6e258aba6399fa86be4684674 (patch) | |
tree | 5ada958db9d0e68b712032a6ec2acfcd5eb08a1b /athena | |
parent | ee8d3b000414b0b3529f0117a706e0f6f6cbd2d2 (diff) | |
download | chromium_src-9cfa1257745fbec6e258aba6399fa86be4684674.zip chromium_src-9cfa1257745fbec6e258aba6399fa86be4684674.tar.gz chromium_src-9cfa1257745fbec6e258aba6399fa86be4684674.tar.bz2 |
Add Flex to views::BoxLayout.
This CL adds a per-view flex property to BoxLayout. The flex property functions
similarly to the CSS flexbox concept of flex, using the child view's preferred
size as the flex basis and then adding or removing space within each flexed
so that all views fit within the parent.
This CL also removes MAIN_AXIS_ALIGNMENT_FILL as it is superceded by
SetDefaultFlex().
BUG=386475
Review URL: https://codereview.chromium.org/360213002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'athena')
-rw-r--r-- | athena/home/bottom_home_view.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/athena/home/bottom_home_view.cc b/athena/home/bottom_home_view.cc index c05bbf4..98cbc13 100644 --- a/athena/home/bottom_home_view.cc +++ b/athena/home/bottom_home_view.cc @@ -30,8 +30,7 @@ BottomHomeView::BottomHomeView(app_list::AppListViewDelegate* view_delegate) views::BoxLayout* items_layout = new views::BoxLayout( views::BoxLayout::kHorizontal, 0, 0, 0); - items_layout->set_main_axis_alignment( - views::BoxLayout::MAIN_AXIS_ALIGNMENT_FILL); + items_layout->SetDefaultFlex(1); items_container->SetLayoutManager(items_layout); for (size_t i = 0; i < top_level->item_count(); ++i) { app_list::TileItemView* tile_item_view = new app_list::TileItemView(); |