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

Side by Side Diff: ui/app_list/views/apps_grid_view.cc

Issue 305433002: Experimental app list slide animation is now horizontal, not vertical. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clip AppsGridView to avoid off-screen icons drawing over the start screen. Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/app_list/views/contents_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/app_list/views/apps_grid_view.h" 5 #include "ui/app_list/views/apps_grid_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 drag_pointer_(NONE), 351 drag_pointer_(NONE),
352 drop_attempt_(DROP_FOR_NONE), 352 drop_attempt_(DROP_FOR_NONE),
353 drag_and_drop_host_(NULL), 353 drag_and_drop_host_(NULL),
354 forward_events_to_drag_and_drop_host_(false), 354 forward_events_to_drag_and_drop_host_(false),
355 page_flip_target_(-1), 355 page_flip_target_(-1),
356 page_flip_delay_in_ms_(kPageFlipDelayInMs), 356 page_flip_delay_in_ms_(kPageFlipDelayInMs),
357 bounds_animator_(this), 357 bounds_animator_(this),
358 activated_folder_item_view_(NULL), 358 activated_folder_item_view_(NULL),
359 dragging_for_reparent_item_(false) { 359 dragging_for_reparent_item_(false) {
360 SetPaintToLayer(true); 360 SetPaintToLayer(true);
361 // Clip any icons that are outside the grid view's bounds. These icons would
362 // otherwise be visible to the user when the grid view is off screen.
363 layer()->SetMasksToBounds(true);
361 SetFillsBoundsOpaquely(false); 364 SetFillsBoundsOpaquely(false);
362 365
363 pagination_model_->AddObserver(this); 366 pagination_model_->AddObserver(this);
364 AddChildView(page_switcher_view_); 367 AddChildView(page_switcher_view_);
365 } 368 }
366 369
367 AppsGridView::~AppsGridView() { 370 AppsGridView::~AppsGridView() {
368 // Coming here |drag_view_| should already be canceled since otherwise the 371 // Coming here |drag_view_| should already be canceled since otherwise the
369 // drag would disappear after the app list got animated away and closed, 372 // drag would disappear after the app list got animated away and closed,
370 // which would look odd. 373 // which would look odd.
(...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after
2148 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index, 2151 void AppsGridView::SetAsFolderDroppingTarget(const Index& target_index,
2149 bool is_target_folder) { 2152 bool is_target_folder) {
2150 AppListItemView* target_view = 2153 AppListItemView* target_view =
2151 static_cast<AppListItemView*>( 2154 static_cast<AppListItemView*>(
2152 GetViewAtSlotOnCurrentPage(target_index.slot)); 2155 GetViewAtSlotOnCurrentPage(target_index.slot));
2153 if (target_view) 2156 if (target_view)
2154 target_view->SetAsAttemptedFolderTarget(is_target_folder); 2157 target_view->SetAsAttemptedFolderTarget(is_target_folder);
2155 } 2158 }
2156 2159
2157 } // namespace app_list 2160 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/views/contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698