• Connie Wan's avatar
    Polish when tab separators appear · df9c2c6e
    Connie Wan authored
    Fixed two issues noticed while working on Tab Groups:
    1) The first tab does not have a leading separator even when a group header is to its left. It should have a separator in this case.
    2) The last tab in a selection has a trailing separator if it's A) the last visible tab and B) not the active tab. It shouldn't have a separator in this case.
    
    This fix produces the correct results for #1 and #2 while still respecting the fade in/out of the separators on hover.
    
    I was not able to find any existing unit tests for the separator. I looked into writing one, but the separators are just painted on using canvas->DrawRect(). Let me know if a screencast would help, or I can demonstrate the change locally.
    
    Bug: 1022100
    Change-Id: Id5ad6c7e03ee00292a63b8f2350ceb84e448c05d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899887
    Commit-Queue: Connie Wan <connily@chromium.org>
    Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
    Reviewed-by: default avatarCharlene Yan <cyan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#714571}
    df9c2c6e
tab_style_views.cc 38.2 KB