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

Unified Diff: ui/app_list/views/suggestions_container_view.cc

Issue 2960123002: Revert of Replace AllAppsTileItemView with ArrowExpandView (Closed)
Patch Set: Created 3 years, 6 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 | « ui/app_list/views/start_page_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/suggestions_container_view.cc
diff --git a/ui/app_list/views/suggestions_container_view.cc b/ui/app_list/views/suggestions_container_view.cc
index fef2d865d1aae1edeb8de95a49a5e69b9dfe2c52..b3d2ca6df5654ab7d78f67450059c610fdbe79e1 100644
--- a/ui/app_list/views/suggestions_container_view.cc
+++ b/ui/app_list/views/suggestions_container_view.cc
@@ -20,6 +20,7 @@
constexpr int kTileSpacing = 7;
constexpr int kNumTilesCols = 5;
constexpr int kTilesHorizontalMarginLeft = 145;
+constexpr int kCenterColumnOfStartPageAppGrid = 3;
} // namespace
@@ -147,14 +148,21 @@
search_result_tile_views_.emplace_back(tile_item);
}
- if (all_apps_button_ && !is_fullscreen_app_list_enabled_) {
+ if (all_apps_button_)
all_apps_button_->UpdateIcon();
-
+ if (is_fullscreen_app_list_enabled_) {
+ // Also add a special "all apps" button to the middle of the next row of the
+ // container.
+ tiles_layout_manager->StartRow(0, 0);
+ tiles_layout_manager->SkipColumns(kCenterColumnOfStartPageAppGrid);
+ } else {
// Also add a special "all apps" button to the end of the next row of the
// container.
if (i % kNumTilesCols == 0)
tiles_layout_manager->StartRow(0, 0);
+ }
+ if (all_apps_button_) {
tiles_layout_manager->AddView(all_apps_button_);
AddChildView(all_apps_button_);
}
« no previous file with comments | « ui/app_list/views/start_page_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698