Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Issue 2671443002: Make the extra padding around VectorIconButtons configurable. (Closed)

Created:
3 years, 10 months ago by Peter Kasting
Modified:
3 years, 9 months ago
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make the extra padding around VectorIconButtons configurable. Pre-Harmony, these always assume 4 px of padding on every side. They also assume the default ripple size will work (it is normally 24 DIP, which lines up with a 16 DIP icon + 2 * 4 DIP padding). In Harmony, we want to change the size of the close buttons to 16 px, with no padding. This change makes the padding amount configurable through the various delegates, and changes the ripple to be sized to the icon button size itself. I think there is no functional change pre-Harmony, because I think VectorIconButton is always used for 16 DIP vectors, but I didn't audit. BUG=686962 TEST=Launch Chrome with --secondary-ui-md, open the Page Info dialog, and hover the close button. The hover area should be 16 DIP.

Patch Set 1 #

Patch Set 2 : Make sure Harmony close buttons stay in place #

Total comments: 2

Patch Set 3 : Rebase #

Patch Set 4 : Rebase take 2 #

Patch Set 5 : Resync #

Patch Set 6 : Resync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -12 lines) Patch
M chrome/browser/ui/views/chrome_views_delegate.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/chrome_views_delegate.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/harmony/harmony_layout_delegate.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/harmony/layout_delegate.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/harmony/layout_delegate.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/controls/button/vector_icon_button.h View 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/controls/button/vector_icon_button.cc View 1 2 3 4 5 2 chunks +16 lines, -9 lines 0 comments Download
M ui/views/layout/layout_constants.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/views_delegate.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/views_delegate.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (5 generated)
Peter Kasting
estade: vector_icon_button.* ellyjones: *layout_delegate* sky: rest
3 years, 10 months ago (2017-02-01 04:48:13 UTC) #4
Elly Fong-Jones
c/b/ui/views/harmony/* lgtm These touch targets are too small for touch. We should make sure that ...
3 years, 10 months ago (2017-02-01 16:06:02 UTC) #7
sky
https://codereview.chromium.org/2671443002/diff/20001/ui/views/controls/button/vector_icon_button.cc File ui/views/controls/button/vector_icon_button.cc (right): https://codereview.chromium.org/2671443002/diff/20001/ui/views/controls/button/vector_icon_button.cc#newcode65 ui/views/controls/button/vector_icon_button.cc:65: const gfx::Insets insets = ViewsDelegate::GetInstance()->GetButtonPadding(); Is the plan to ...
3 years, 10 months ago (2017-02-01 16:57:29 UTC) #8
Evan Stade
I have the same questions that you pose on the bug, as well as: do ...
3 years, 10 months ago (2017-02-01 17:09:51 UTC) #9
Peter Kasting
On 2017/02/01 17:09:51, Evan Stade wrote: > I have the same questions that you pose ...
3 years, 10 months ago (2017-02-01 19:48:38 UTC) #10
Peter Kasting
https://codereview.chromium.org/2671443002/diff/20001/ui/views/controls/button/vector_icon_button.cc File ui/views/controls/button/vector_icon_button.cc (right): https://codereview.chromium.org/2671443002/diff/20001/ui/views/controls/button/vector_icon_button.cc#newcode65 ui/views/controls/button/vector_icon_button.cc:65: const gfx::Insets insets = ViewsDelegate::GetInstance()->GetButtonPadding(); On 2017/02/01 16:57:28, sky ...
3 years, 10 months ago (2017-02-01 19:48:45 UTC) #11
sky
On 2017/02/01 19:48:38, Peter Kasting wrote: > On 2017/02/01 17:09:51, Evan Stade wrote: > > ...
3 years, 10 months ago (2017-02-01 21:58:12 UTC) #12
Evan Stade
On 2017/02/01 21:58:12, sky wrote: > On 2017/02/01 19:48:38, Peter Kasting wrote: > > On ...
3 years, 10 months ago (2017-02-01 22:07:47 UTC) #13
Peter Kasting
On 2017/02/01 22:07:47, Evan Stade wrote: > On 2017/02/01 21:58:12, sky wrote: > > On ...
3 years, 10 months ago (2017-02-01 22:27:52 UTC) #14
Peter Kasting
3 years, 9 months ago (2017-03-03 02:33:28 UTC) #15
I've uploaded a new snap here so it is easier to try this patch locally, mostly
for Bret's benefit.

However, the Harmony spec has now changed, and close buttons have a 24 px hover
size, rather than 16 px.  So this CL is not strictly necessary at the moment.

I'm going to close this for now.

Powered by Google App Engine
This is Rietveld 408576698