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

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

Issue 889403005: Make start page fill app list bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new_apps_grid_paddings
Patch Set: Created 5 years, 10 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
Index: ui/app_list/views/contents_view.cc
diff --git a/ui/app_list/views/contents_view.cc b/ui/app_list/views/contents_view.cc
index 1e299d706a7abd58dcb2d8cb63ac79bbe2cb4f2a..5186efe622256f0fe260a7a2a5c553f74f8f6cc7 100644
--- a/ui/app_list/views/contents_view.cc
+++ b/ui/app_list/views/contents_view.cc
@@ -370,7 +370,8 @@ gfx::Rect ContentsView::GetSearchBoxBoundsForState(
// Convert to ContentsView space, assuming that the StartPageView is in the
// ContentsView's default bounds.
return start_page_view_->GetSearchBoxBounds() +
- GetDefaultContentsBounds().OffsetFromOrigin();
+ default_animator_->GetOnscreenPageBounds(GetPageIndexForState(state))
+ .OffsetFromOrigin();
}
return GetDefaultSearchBoxBounds();
@@ -459,14 +460,10 @@ void ContentsView::Layout() {
// Move the current view onto the screen, and all other views off screen to
// the left. (Since we are not animating, we don't need to be careful about
// which side we place the off-screen views onto.)
- gfx::Rect rect(GetDefaultContentsBounds());
- // Custom pages are aligned to the top of the window, not under the search
- // box.
- double progress = 0;
- if (IsStateActive(AppListModel::STATE_CUSTOM_LAUNCHER_PAGE)) {
- rect = GetContentsBounds();
- progress = 1;
- }
+ gfx::Rect rect =
+ default_animator_->GetOnscreenPageBounds(GetActivePageIndex());
+ double progress =
+ IsStateActive(AppListModel::STATE_CUSTOM_LAUNCHER_PAGE) ? 1 : 0;
// Notify the custom launcher page that the active page has changed.
app_list_main_view_->view_delegate()->CustomLauncherPageAnimationChanged(

Powered by Google App Engine
This is Rietveld 408576698