• Peter Boström's avatar
    Use inset anchor bounds for toolbar buttons · 6f92518b
    Peter Boström authored
    Adds a Views::GetAnchorBoundsInScreen() method. This defaults to
    GetBoundsInScreen() but can be overridden for views whose visual
    bounds differ from their actual bounds. This is the case for toolbar
    buttons on Touch (that provide larger hit targets than their visual
    size).
    
    This method is then used for the menus spawned by AppMenuButton and
    ToolbarButton as well as BubbleDialogDelegate which allows these
    specific menus and BubbleDialogDelegates in general to be better
    aligned visually to their anchors.
    
    Bug: chromium:800372, chromium:869928
    Change-Id: I9c516d8a7ecb6c922e347d4db61ce1db72c71be7
    Reviewed-on: https://chromium-review.googlesource.com/1152525
    Commit-Queue: Peter Boström <pbos@chromium.org>
    Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
    Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#579861}
    6f92518b
toolbar_button.h 5.19 KB