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

Issue 11262002: Merge TextButton and LabelButton border images util structs, etc. (Closed)

Created:
8 years, 2 months ago by msw
Modified:
8 years, 1 month ago
Reviewers:
tfarina, Peter Kasting, sky
CC:
chromium-reviews
Visibility:
Public.

Description

Merge TextButton and LabelButton border images util structs, etc. Consolidate new BorderImages files from TextButton and LabelButton. Rewrite image painting as a struct member function; support arbitrary rects. Add static IDR arrays for TextButton and LabelButton shared image assets Use LabelButton views as implicit NativeThemeDelegates for LabelButtonBorder. Nix LabelButtonBorder layer kClear_Mode as in http://crrev.com/160227. Use macros to define ordered image asset IDR arrays; misc cleanup/refactoring. TODO(followup): Merge "nine-box" code in BorderImages, BubbleBorder, ImagePainter, etc. TODO(followup): Stitch border image assets together and use ImagePainter? BUG=155363 TEST=No observable button changes or regressions. R=pkasting@chromium.org TBR=sky@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=164557

Patch Set 1 #

Patch Set 2 : Move ButtonBorderImages to its own file. #

Patch Set 3 : Rewrite image painting; LabelButtonBorder cleanup. #

Patch Set 4 : Considering a couple BORDER_IMAGES macros. #

Patch Set 5 : Rename BorderImages and const image id arrays, etc. #

Total comments: 14

Patch Set 6 : Address comments. #

Patch Set 7 : Add friend tests, remove unused variable. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -308 lines) Patch
M chrome/browser/ui/views/infobars/infobar_button_border.cc View 1 2 3 4 1 chunk +17 lines, -42 lines 0 comments Download
A ui/views/controls/button/border_images.h View 1 2 3 4 1 chunk +47 lines, -0 lines 0 comments Download
A ui/views/controls/button/border_images.cc View 1 2 3 4 5 1 chunk +67 lines, -0 lines 0 comments Download
M ui/views/controls/button/label_button.h View 1 2 3 4 5 6 3 chunks +6 lines, -5 lines 0 comments Download
M ui/views/controls/button/label_button.cc View 1 2 3 4 5 1 chunk +5 lines, -5 lines 0 comments Download
M ui/views/controls/button/label_button_border.h View 1 2 3 4 5 2 chunks +8 lines, -31 lines 0 comments Download
M ui/views/controls/button/label_button_border.cc View 1 2 3 4 5 3 chunks +37 lines, -110 lines 0 comments Download
M ui/views/controls/button/text_button.h View 1 2 3 4 5 3 chunks +7 lines, -21 lines 0 comments Download
M ui/views/controls/button/text_button.cc View 1 2 3 4 5 6 5 chunks +29 lines, -94 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
msw
Hey Peter, please take a look; thanks! I'm on the fence regarding the macros.
8 years, 1 month ago (2012-10-24 21:31:02 UTC) #1
Peter Kasting
LGTM http://codereview.chromium.org/11262002/diff/1008/ui/views/controls/button/border_images.cc File ui/views/controls/button/border_images.cc (right): http://codereview.chromium.org/11262002/diff/1008/ui/views/controls/button/border_images.cc#newcode15 ui/views/controls/button/border_images.cc:15: x ## _BOTTOM_LEFT, x ## _BOTTOM, x ## ...
8 years, 1 month ago (2012-10-25 23:56:38 UTC) #2
tfarina
http://codereview.chromium.org/11262002/diff/1008/ui/views/controls/button/text_button.h File ui/views/controls/button/text_button.h (right): http://codereview.chromium.org/11262002/diff/1008/ui/views/controls/button/text_button.h#newcode17 ui/views/controls/button/text_button.h:17: #include "ui/views/controls/button/border_images.h" nit: sort
8 years, 1 month ago (2012-10-26 00:38:12 UTC) #3
tfarina
http://codereview.chromium.org/11262002/diff/1008/ui/views/views.gyp File ui/views/views.gyp (right): http://codereview.chromium.org/11262002/diff/1008/ui/views/views.gyp#newcode70 ui/views/views.gyp:70: 'controls/button/border_images.cc', nit: sort
8 years, 1 month ago (2012-10-26 00:38:36 UTC) #4
tfarina
http://codereview.chromium.org/11262002/diff/1008/ui/views/controls/button/text_button.cc File ui/views/controls/button/text_button.cc (right): http://codereview.chromium.org/11262002/diff/1008/ui/views/controls/button/text_button.cc#newcode30 ui/views/controls/button/text_button.cc:30: static const int kDefaultIconTextSpacing = 5; nit: since we ...
8 years, 1 month ago (2012-10-26 00:40:18 UTC) #5
msw
Comments addressed; landing (may TBR sky). https://codereview.chromium.org/11262002/diff/1008/ui/views/controls/button/border_images.cc File ui/views/controls/button/border_images.cc (right): https://codereview.chromium.org/11262002/diff/1008/ui/views/controls/button/border_images.cc#newcode15 ui/views/controls/button/border_images.cc:15: x ## _BOTTOM_LEFT, ...
8 years, 1 month ago (2012-10-27 07:40:57 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/11262002/16001
8 years, 1 month ago (2012-10-27 07:41:12 UTC) #7
commit-bot: I haz the power
Presubmit check for 11262002-16001 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 1 month ago (2012-10-27 07:41:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/11262002/16001
8 years, 1 month ago (2012-10-27 07:56:22 UTC) #9
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
8 years, 1 month ago (2012-10-27 08:32:05 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/11262002/29001
8 years, 1 month ago (2012-10-27 20:40:34 UTC) #11
commit-bot: I haz the power
8 years, 1 month ago (2012-10-27 22:37:33 UTC) #12
Change committed as 164557

Powered by Google App Engine
This is Rietveld 408576698