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

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

Issue 781833005: Make SearchResultPageView animation clip to its onscreen bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_overlay_one
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/contents_animator.cc
diff --git a/ui/app_list/views/contents_animator.cc b/ui/app_list/views/contents_animator.cc
index fd8048b199b928157e3ba4bd31018b98ccba8869..d29debe3820239a548c9d0c95b944cb82078a6b5 100644
--- a/ui/app_list/views/contents_animator.cc
+++ b/ui/app_list/views/contents_animator.cc
@@ -125,6 +125,18 @@ void DefaultAnimator::Update(double progress, int from_page, int to_page) {
contents_view()->GetPageView(from_page)->SetBoundsRect(from_page_rect);
contents_view()->GetPageView(to_page)->SetBoundsRect(to_page_rect);
+ // Clip the search view to its target bounds.
+ int search_results_index =
+ contents_view()->GetPageIndexForState(AppListModel::STATE_SEARCH_RESULTS);
Matt Giuca 2014/12/09 07:34:18 This doesn't do what the CL description says, whic
calamity 2014/12/10 05:23:10 Oopz. Yeah, I changed it. It looked bad when the s
+ if (from_page == search_results_index) {
+ contents_view()->GetPageView(from_page)->set_clip_insets(
+ from_page_rect.InsetsFrom(from_page_onscreen));
+ }
+ if (to_page == search_results_index) {
+ contents_view()->GetPageView(to_page)->set_clip_insets(
+ to_page_rect.InsetsFrom(to_page_onscreen));
+ }
+
UpdateCustomPageForDefaultAnimation(progress, from_page, to_page);
UpdateSearchBoxForDefaultAnimation(progress, from_page, to_page);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698