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

Issue 12543032: Add views::RichLabel, a class which creates multi-line text with mixed (Closed)

Created:
7 years, 9 months ago by Evan Stade
Modified:
7 years, 9 months ago
Reviewers:
msw, sky
CC:
chromium-reviews, Raman Kakilate, tfarina, benquan, dhollowa+watch_chromium.org, ahutter, dbeam+watch-autofill_chromium.org, Dane Wallinga, dyu1, Albert Bodenhamer, estade+watch_chromium.org, Ilya Sherman
Visibility:
Public.

Description

Add views::RichLabel, a class which creates multi-line text with mixed links and plain text. BUG=168704 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188496

Patch Set 1 #

Total comments: 2

Patch Set 2 : other interface #

Total comments: 21

Patch Set 3 : review #

Total comments: 11

Patch Set 4 : more better #

Patch Set 5 : overlap #

Patch Set 6 : comment #

Patch Set 7 : add tests #

Total comments: 43

Patch Set 8 : consts #

Total comments: 4

Patch Set 9 : fix comment + win compile #

Patch Set 10 : compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+400 lines, -2 lines) Patch
M ui/views/controls/link_listener.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
A ui/views/controls/styled_label.h View 1 2 3 4 5 6 7 1 chunk +79 lines, -0 lines 0 comments Download
A ui/views/controls/styled_label.cc View 1 2 3 4 5 6 7 8 1 chunk +173 lines, -0 lines 0 comments Download
A ui/views/controls/styled_label_listener.h View 1 1 chunk +26 lines, -0 lines 0 comments Download
A ui/views/controls/styled_label_unittest.cc View 1 2 3 4 5 6 7 1 chunk +114 lines, -0 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 2 chunks +4 lines, -0 lines 0 comments Download
M ui/views/window/dialog_client_view.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 21 (0 generated)
Evan Stade
this patch is not finished (for one thing, clicking the links does nothing), but before ...
7 years, 9 months ago (2013-03-12 01:49:26 UTC) #1
sky
I've also added msw to do this as he has thought about how to use ...
7 years, 9 months ago (2013-03-12 13:45:59 UTC) #2
msw
My rough plan to accomplish this (below) is rather involved. So RichLabel/StyledLabel may be a ...
7 years, 9 months ago (2013-03-12 19:48:27 UTC) #3
Evan Stade
updated
7 years, 9 months ago (2013-03-13 01:03:35 UTC) #4
msw
Your approach to layout is interesting; it's probably not the cleanest solution, but it's clever ...
7 years, 9 months ago (2013-03-13 03:22:07 UTC) #5
sky
https://codereview.chromium.org/12543032/diff/5001/ui/views/controls/styled_label.cc File ui/views/controls/styled_label.cc (right): https://codereview.chromium.org/12543032/diff/5001/ui/views/controls/styled_label.cc#newcode24 ui/views/controls/styled_label.cc:24: StyledLabel::StyledLabel(const string16& text, StyledLabelListener* listener) On 2013/03/13 03:22:07, msw ...
7 years, 9 months ago (2013-03-13 14:33:00 UTC) #6
Evan Stade
https://codereview.chromium.org/12543032/diff/5001/ui/views/controls/styled_label.cc File ui/views/controls/styled_label.cc (right): https://codereview.chromium.org/12543032/diff/5001/ui/views/controls/styled_label.cc#newcode32 ui/views/controls/styled_label.cc:32: link_ranges_.push(LinkRange(range)); On 2013/03/13 14:33:00, sky wrote: > Doesn't this ...
7 years, 9 months ago (2013-03-14 00:30:46 UTC) #7
sky
https://codereview.chromium.org/12543032/diff/5001/ui/views/controls/styled_label.h File ui/views/controls/styled_label.h (right): https://codereview.chromium.org/12543032/diff/5001/ui/views/controls/styled_label.h#newcode32 ui/views/controls/styled_label.h:32: void SetLink(const ui::Range& range); On 2013/03/14 00:30:46, Evan Stade ...
7 years, 9 months ago (2013-03-14 14:43:57 UTC) #8
sky
I believe this code is assuming Label and Link are the same height, is that ...
7 years, 9 months ago (2013-03-14 15:39:37 UTC) #9
Evan Stade
will start working on tests. PTAL at implementation changes. On 2013/03/14 15:39:37, sky wrote: > ...
7 years, 9 months ago (2013-03-14 19:07:40 UTC) #10
sky
LGTM
7 years, 9 months ago (2013-03-14 20:19:33 UTC) #11
Evan Stade
added unit test.
7 years, 9 months ago (2013-03-14 22:13:44 UTC) #12
sky
SLGTM https://codereview.chromium.org/12543032/diff/26001/ui/views/controls/styled_label_unittest.cc File ui/views/controls/styled_label_unittest.cc (right): https://codereview.chromium.org/12543032/diff/26001/ui/views/controls/styled_label_unittest.cc#newcode38 ui/views/controls/styled_label_unittest.cc:38: }; DISALLOW...
7 years, 9 months ago (2013-03-14 23:08:01 UTC) #13
msw
Bonus points if you add a test or two of link handling. https://codereview.chromium.org/12543032/diff/5001/ui/views/controls/styled_label.h File ui/views/controls/styled_label.h ...
7 years, 9 months ago (2013-03-14 23:24:29 UTC) #14
Evan Stade
https://codereview.chromium.org/12543032/diff/26001/ui/views/controls/styled_label.cc File ui/views/controls/styled_label.cc (right): https://codereview.chromium.org/12543032/diff/26001/ui/views/controls/styled_label.cc#newcode18 ui/views/controls/styled_label.cc:18: bool StyledLabel::LinkRange::operator<(const StyledLabel::LinkRange& other) On 2013/03/14 23:24:30, msw wrote: ...
7 years, 9 months ago (2013-03-15 02:42:27 UTC) #15
sky
https://codereview.chromium.org/12543032/diff/26001/ui/views/controls/styled_label.cc File ui/views/controls/styled_label.cc (right): https://codereview.chromium.org/12543032/diff/26001/ui/views/controls/styled_label.cc#newcode18 ui/views/controls/styled_label.cc:18: bool StyledLabel::LinkRange::operator<(const StyledLabel::LinkRange& other) On 2013/03/15 02:42:27, Evan Stade ...
7 years, 9 months ago (2013-03-15 03:32:18 UTC) #16
msw
LGTM with a couple nits; thanks! https://codereview.chromium.org/12543032/diff/26001/ui/views/controls/styled_label.cc File ui/views/controls/styled_label.cc (right): https://codereview.chromium.org/12543032/diff/26001/ui/views/controls/styled_label.cc#newcode18 ui/views/controls/styled_label.cc:18: bool StyledLabel::LinkRange::operator<(const StyledLabel::LinkRange& ...
7 years, 9 months ago (2013-03-15 08:38:02 UTC) #17
Evan Stade
https://codereview.chromium.org/12543032/diff/43001/ui/views/controls/styled_label.cc File ui/views/controls/styled_label.cc (right): https://codereview.chromium.org/12543032/diff/43001/ui/views/controls/styled_label.cc#newcode20 ui/views/controls/styled_label.cc:20: // a link. On 2013/03/15 08:38:02, msw wrote: > ...
7 years, 9 months ago (2013-03-15 20:28:38 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/estade@chromium.org/12543032/57001
7 years, 9 months ago (2013-03-15 20:28:53 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/estade@chromium.org/12543032/68002
7 years, 9 months ago (2013-03-15 20:58:26 UTC) #20
Evan Stade
7 years, 9 months ago (2013-03-15 22:56:47 UTC) #21
Message was sent while issue was closed.
Committed patchset #10 manually as r188496 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698