| Index: ui/app_list/views/app_list_main_view.cc
|
| diff --git a/ui/app_list/views/app_list_main_view.cc b/ui/app_list/views/app_list_main_view.cc
|
| index 70c926c5e63c7a16f3097affa0e45d18b8d0948c..37e55b1001ddd1c0bc207d5a0ac79bbd2c378a9d 100644
|
| --- a/ui/app_list/views/app_list_main_view.cc
|
| +++ b/ui/app_list/views/app_list_main_view.cc
|
| @@ -26,6 +26,7 @@
|
| #include "ui/app_list/views/contents_switcher_view.h"
|
| #include "ui/app_list/views/contents_view.h"
|
| #include "ui/app_list/views/search_box_view.h"
|
| +#include "ui/views/border.h"
|
| #include "ui/views/controls/textfield/textfield.h"
|
| #include "ui/views/layout/box_layout.h"
|
| #include "ui/views/layout/fill_layout.h"
|
| @@ -41,6 +42,10 @@ const int kInnerPadding = 1;
|
| // The maximum allowed time to wait for icon loading in milliseconds.
|
| const int kMaxIconLoadingWaitTimeInMs = 50;
|
|
|
| +// The padding around the search box in the experimental app list.
|
| +const int kSearchBoxViewPadding = 24;
|
| +const int kSearchBoxViewPaddingBottom = 12;
|
| +
|
| // A view that holds another view and takes its preferred size. This is used for
|
| // wrapping the search box view so it still gets laid out while hidden. This is
|
| // a separate class so it can notify the main view on search box visibility
|
| @@ -124,7 +129,15 @@ AppListMainView::AppListMainView(AppListViewDelegate* delegate,
|
| kInnerPadding));
|
|
|
| search_box_view_ = new SearchBoxView(this, delegate);
|
| - AddChildView(new SearchBoxContainerView(this, search_box_view_));
|
| + views::View* container = new SearchBoxContainerView(this, search_box_view_);
|
| + if (switches::IsExperimentalAppListEnabled()) {
|
| + container->SetBorder(
|
| + views::Border::CreateEmptyBorder(kSearchBoxViewPadding,
|
| + kSearchBoxViewPadding,
|
| + kSearchBoxViewPaddingBottom,
|
| + kSearchBoxViewPadding));
|
| + }
|
| + AddChildView(container);
|
| AddContentsViews();
|
|
|
| // Switch the apps grid view to the specified page.
|
|
|