Chromium Code Reviews| 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..0fa041b3effa5d22aa5057d7034e5b41d97c8249 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 kExperimentalSearchBoxViewPadding = 24; |
|
Matt Giuca
2014/08/25 05:15:25
Don't use "Experimental" here. It won't be experim
calamity
2014/08/26 01:16:30
Done.
|
| +const int kExperimentalSearchBoxViewPaddingBottom = 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,13 @@ 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_); |
| + container->SetBorder( |
| + views::Border::CreateEmptyBorder(kExperimentalSearchBoxViewPadding, |
| + kExperimentalSearchBoxViewPadding, |
| + kExperimentalSearchBoxViewPaddingBottom, |
| + kExperimentalSearchBoxViewPadding)); |
| + AddChildView(container); |
| AddContentsViews(); |
| // Switch the apps grid view to the specified page. |