• erg@chromium.org's avatar
    linux_aura: Fix the insets on LabelButtons. · 4542eefa
    erg@chromium.org authored
    Starting in r266097, we always used the insets provided by Gtk2Border. We had previously had a hacky solution where we tried to determine whether the button was a toolbar button by digging in its style, but that hack was removed because it overreached. We had this hack to deal with slightly larger icon assets that GTK handed us.
    
    In r269180, there was a subtle timing change, which then meant  that buttons outside the toolbar started using the GTK insets, such as buttons in the extension removal dialog, the javascript alert dialog, etc.
    
    Now, Gtk2Border always uses the insets provided by the views::LabelButtonBorder (and we no longer have a concept of "GTK insets"), and we explicitly set smaller insets that don't cause the clipping issues only in ToolbarButton. This lets both bugs be fixed at the same time.
    
    BUG=372305
    TEST=Using GTK+ theme mode, the left edge of the back button shouldn't be visually chopped off.
    TEST=Using GTK+ theme mode, The OK button on a javascript alert shouldn't be vertically squashed.
    TEST=Using the default theme, both of the above should look normal.
    R=msw@chromium.org, sky@chromium.org
    
    Review URL: https://codereview.chromium.org/292153008
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272326 0039d316-1c4b-4281-b951-d872f2087c98
    4542eefa
back_button.h 1.38 KB