• Fabio Tirelo's avatar
    Stop using layout provider for menu horizontal spaces · 8bcae931
    Fabio Tirelo authored
    Menu horizontal spaces were consolidated into a single
    item_horizontal_padding by crrev.com/c/1089431, which also made the
    value come from the layout provider.
    
    However, when Harmony is enabled, the horizontal padding becomes too
    large (8 instead of 16). As a side effect, menus became too spacey on
    Harmony (see details on the linked bug).
    
    One alternative was to use DISTANCE_RELATED_CONTROL_HORIZONTAL_SMALL and
    define the corresponding padding as 8 for Harmony, but that would
    introduce a dependency from ui/views/controls to chrome/browser/ui/views,
    which I don't think is desirable. In addition, while Harmony is rolling
    out, making sure we don't break paddings on other browser components can
    be challenging, so I added a TODO to make a general consolidation once
    Harmony becomes the default.
    
    Bug: 851843
    Change-Id: Ifbecf12f434e20af8f93b590feed7eb4b2bc33de
    Reviewed-on: https://chromium-review.googlesource.com/1108451Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
    Commit-Queue: Fabio Tirelo <ftirelo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#569050}
    8bcae931
layout_provider.cc 5.95 KB