| Index: ui/app_list/views/start_page_view.cc
|
| diff --git a/ui/app_list/views/start_page_view.cc b/ui/app_list/views/start_page_view.cc
|
| index ad3b9b8878da615294abda11bb610b4596484779..b56230264c04f163071ee75cd65b993816c2bf27 100644
|
| --- a/ui/app_list/views/start_page_view.cc
|
| +++ b/ui/app_list/views/start_page_view.cc
|
| @@ -23,6 +23,7 @@
|
| #include "ui/app_list/views/app_list_main_view.h"
|
| #include "ui/app_list/views/contents_view.h"
|
| #include "ui/app_list/views/custom_launcher_page_view.h"
|
| +#include "ui/app_list/views/expand_arrow_view.h"
|
| #include "ui/app_list/views/indicator_chip_view.h"
|
| #include "ui/app_list/views/search_box_view.h"
|
| #include "ui/app_list/views/search_result_container_view.h"
|
| @@ -56,6 +57,7 @@ constexpr int kStartPageSearchBoxWidthFullscreen = 544;
|
| constexpr int kWebViewWidth = 700;
|
| constexpr int kWebViewHeight = 224;
|
|
|
| +constexpr int kExpandArrowTopPadding = 28;
|
| constexpr int kLauncherPageBackgroundWidth = 400;
|
|
|
| } // namespace
|
| @@ -103,11 +105,14 @@ StartPageView::StartPageView(AppListMainView* app_list_main_view,
|
| instant_container_(new views::View),
|
| custom_launcher_page_background_(new CustomLauncherPageBackgroundView(
|
| view_delegate_->GetModel()->custom_launcher_page_name())),
|
| - suggestions_container_(new SuggestionsContainerView(
|
| - app_list_main_view->contents_view(),
|
| - new AllAppsTileItemView(app_list_main_view_->contents_view(),
|
| - app_list_view))),
|
| is_fullscreen_app_list_enabled_(features::IsFullscreenAppListEnabled()) {
|
| + suggestions_container_ = new SuggestionsContainerView(
|
| + app_list_main_view->contents_view(),
|
| + is_fullscreen_app_list_enabled_
|
| + ? nullptr
|
| + : new AllAppsTileItemView(app_list_main_view_->contents_view(),
|
| + app_list_view));
|
| +
|
| search_box_spacer_view_->SetPreferredSize(gfx::Size(
|
| is_fullscreen_app_list_enabled_ ? kStartPageSearchBoxWidthFullscreen
|
| : kStartPageSearchBoxWidth,
|
| @@ -125,6 +130,11 @@ StartPageView::StartPageView(AppListMainView* app_list_main_view,
|
|
|
| // The view containing the start page tiles.
|
| AddChildView(suggestions_container_);
|
| + if (is_fullscreen_app_list_enabled_) {
|
| + expand_arrow_view_ = new ExpandArrowView(
|
| + app_list_main_view_->contents_view(), app_list_view);
|
| + AddChildView(expand_arrow_view_);
|
| + }
|
| AddChildView(custom_launcher_page_background_);
|
|
|
| suggestions_container_->SetResults(view_delegate_->GetModel()->results());
|
| @@ -245,6 +255,18 @@ void StartPageView::Layout() {
|
| }
|
| suggestions_container_->SetBoundsRect(bounds);
|
|
|
| + if (expand_arrow_view_) {
|
| + gfx::Rect expand_arrow_rect(GetContentsBounds());
|
| + int left_right_padding =
|
| + (bounds.width() - expand_arrow_view_->GetPreferredSize().width()) / 2;
|
| +
|
| + expand_arrow_rect.Inset(left_right_padding, 0, left_right_padding, 0);
|
| + expand_arrow_rect.set_y(bounds.bottom() + kExpandArrowTopPadding);
|
| + expand_arrow_rect.set_height(
|
| + expand_arrow_view_->GetPreferredSize().height());
|
| + expand_arrow_view_->SetBoundsRect(expand_arrow_rect);
|
| + }
|
| +
|
| CustomLauncherPageView* custom_launcher_page_view =
|
| app_list_main_view_->contents_view()->custom_page_view();
|
| if (!custom_launcher_page_view)
|
|
|