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

Issue 284033002: Allow TextButton derivatives to override drawing of certain parts. (Closed)

Created:
6 years, 7 months ago by Roger Tawa OOO till Jul 10th
Modified:
6 years, 7 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

Allow TextButton derivatives to override drawing of certain parts. This is needed for the new avatar button. See CL https://codereview.chromium.org/240453006/ for how this will be used to override the text rendering of the button. Currently the new avatar menu override the text rendering but does not do so correctly if the button has an icon. This change allows the new avatar menu to override the text render more cleanly. BUG=311235 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270858

Patch Set 1 : Add comments #

Patch Set 2 : rebased #

Total comments: 2

Patch Set 3 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -30 lines) Patch
M ui/views/controls/button/text_button.h View 1 2 2 chunks +10 lines, -0 lines 0 comments Download
M ui/views/controls/button/text_button.cc View 1 2 3 chunks +37 lines, -30 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Roger Tawa OOO till Jul 10th
Hi Scott, Can you please take a look? Thanks.
6 years, 7 months ago (2014-05-15 02:08:56 UTC) #1
sky
Can you accomplish what you need by override GetTextBounds?
6 years, 7 months ago (2014-05-15 16:28:21 UTC) #2
Roger Tawa OOO till Jul 10th
I don't think so. See the CL mentioned in the description. The rendering of the ...
6 years, 7 months ago (2014-05-15 16:46:59 UTC) #3
sky
https://codereview.chromium.org/284033002/diff/40001/ui/views/controls/button/text_button.h File ui/views/controls/button/text_button.h (right): https://codereview.chromium.org/284033002/diff/40001/ui/views/controls/button/text_button.h#newcode166 ui/views/controls/button/text_button.h:166: virtual void OnPaintText(gfx::Canvas* canvas, PaintButtonMode mode); Why is this ...
6 years, 7 months ago (2014-05-15 16:55:12 UTC) #4
Roger Tawa OOO till Jul 10th
Thanks Scott. Comments addressed, changes uploaded. https://codereview.chromium.org/284033002/diff/40001/ui/views/controls/button/text_button.h File ui/views/controls/button/text_button.h (right): https://codereview.chromium.org/284033002/diff/40001/ui/views/controls/button/text_button.h#newcode166 ui/views/controls/button/text_button.h:166: virtual void OnPaintText(gfx::Canvas* ...
6 years, 7 months ago (2014-05-15 17:19:27 UTC) #5
sky
LGTM
6 years, 7 months ago (2014-05-15 19:20:48 UTC) #6
Roger Tawa OOO till Jul 10th
The CQ bit was checked by rogerta@chromium.org
6 years, 7 months ago (2014-05-15 20:25:14 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rogerta@chromium.org/284033002/60001
6 years, 7 months ago (2014-05-15 20:25:27 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-15 21:40:32 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-15 21:59:58 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_chromeos_rel/builds/27495)
6 years, 7 months ago (2014-05-15 21:59:58 UTC) #11
Roger Tawa OOO till Jul 10th
The CQ bit was checked by rogerta@chromium.org
6 years, 7 months ago (2014-05-15 22:23:04 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rogerta@chromium.org/284033002/60001
6 years, 7 months ago (2014-05-15 22:24:09 UTC) #13
commit-bot: I haz the power
6 years, 7 months ago (2014-05-15 23:49:30 UTC) #14
Message was sent while issue was closed.
Change committed as 270858

Powered by Google App Engine
This is Rietveld 408576698