• Toni Barzic's avatar
    Updates previews icon transition to animate the icon size · 6be323c7
    Toni Barzic authored
    It uses slide animation to be consistent with how other tray items -
    mainly the unified system tray - animate their size. On each animation
    step, it updates the tray icon preferred size, which updates the shelf
    layout.
    
    Adds a previews container view to HoldingSpaceTrayIcon, to make it
    easier to compose the transform changes on the previews during resize.
    A preview movement has two components:
    *   shift animation to handle preview index change within the icon
    *   offset due to icon size change. The icon is expected to grow
        towards the start of the icon, which is opposite of how bounds grow
        by default. As the size changes, the items have to shift so their
        position remains constant relative to the end of the icon.
    The latter is handled by updating transform on the container view
    layer as the resize animation progresses.
    
    Bug: 1142572
    Change-Id: I411844c9a9c8fc4a270feaa94530f34be7bae088
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2601757
    Commit-Queue: Toni Baržić <tbarzic@chromium.org>
    Reviewed-by: default avatarDavid Black <dmblack@google.com>
    Cr-Commit-Position: refs/heads/master@{#839201}
    6be323c7
holding_space_tray_icon.cc 13.6 KB