shelf: Improve drag proxy switch for rip off drag
Fixes few glitches with switching the drag image widget when rip off drag status changes with scrollable shelf (the drag image is switched between one owned by shelf_view and one owned by the shelf view's drag and drop host): * disables the shelf view's drag image proxy visibility animations (so the icon disappears immediately, instead of fading out while the new drag image keeps moving) * when the icon is dragged back to shelf, and the drag image is replaced with the drag and drop icon, do not update the drag_view_ location - given that HandleRipOffDrag returns false in this case, the drag_view_ bounds will be updated after HandleRipOffDrag (doing it twice misplaces the created drag image, at least until the next drag update is handled). * Make drag image position relative to the cursor consistent between two proxies - scrollable shelf view's proxy keeps the cursor position from the drag start, while shelf view's proxy was centering the cursor. BUG=1042533 Change-Id: If9fa5cea3a8714a22c6b58a75af5cf2fe08efc70 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2021612 Commit-Queue: Toni Baržić <tbarzic@chromium.org> Reviewed-by:Xiyuan Xia <xiyuan@chromium.org> Cr-Commit-Position: refs/heads/master@{#735456}
Showing
Please register or sign in to comment