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

Issue 14654018: Make Label's NO_ELIDE setting actually not elide, and change the default (Closed)

Created:
7 years, 7 months ago by Peter Kasting
Modified:
7 years, 7 months ago
CC:
chromium-reviews, tfarina, sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

Make Label's NO_ELIDE setting actually not elide, and change the default behavior to ELIDE_AT_END. This makes the content settings banner in the omnibox look better, since it now just chops the end of the text off while it's animating in instead of eliding it. For non-Linux, non-multiline labels, this means that instead of calling ui::ElideText(..., ui::ELIDE_AT_END) indirectly from Canvas::DrawStringWithShadows(), we now call it in Label::CalculateDrawStringParams(). Presumably this makes no difference, unless there's something weirdly different about the bounds supplied to the ElideText() calls in those two places. For OS_LINUX, this means that non-multiline LTR Labels will now be elided using ui::ElideText() (and thus will use an ellipsis) by default, instead of being faded at the right edge. I don't know how many such elided labels exist on Linux, so it's hard for me to evaluate the impact of this change. Note that callers directly to the canvas string-drawing functions are unaffected by this. BUG=none TEST=none R=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=200850

Patch Set 1 #

Patch Set 2 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -36 lines) Patch
M ash/launcher/launcher_tooltip_manager.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/views/notifications/balloon_view_views.cc View 1 chunk +0 lines, -1 line 0 comments Download
M ui/message_center/views/bounded_label.cc View 1 chunk +0 lines, -1 line 0 comments Download
M ui/message_center/views/message_center_view.cc View 1 chunk +0 lines, -1 line 0 comments Download
M ui/message_center/views/notification_view.cc View 3 chunks +0 lines, -3 lines 0 comments Download
M ui/views/controls/label.h View 1 chunk +1 line, -1 line 1 comment Download
M ui/views/controls/label.cc View 3 chunks +9 lines, -5 lines 0 comments Download
M ui/views/controls/label_unittest.cc View 1 14 chunks +54 lines, -22 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Peter Kasting
sky: General review/OWNERS asvitkine: You originally added the "fade at end" behavior to canvas_skia.cc for ...
7 years, 7 months ago (2013-05-17 01:13:27 UTC) #1
Alexei Svitkine (slow)
> asvitkine: You originally added the "fade at end" behavior to canvas_skia.cc for > Linux, ...
7 years, 7 months ago (2013-05-17 13:49:52 UTC) #2
Alexei Svitkine (slow)
Also, it occurs to me that in reality this should only affect ChromeOS, since it's ...
7 years, 7 months ago (2013-05-17 13:52:17 UTC) #3
sky
LGTM
7 years, 7 months ago (2013-05-17 15:56:13 UTC) #4
sky
The only part of the ui I know that fades at the end is the ...
7 years, 7 months ago (2013-05-17 15:57:14 UTC) #5
tfarina
Bookmark buttons in Bookmarks Bar do not fade the title, they elide them with elipses ...
7 years, 7 months ago (2013-05-17 16:37:01 UTC) #6
Peter Kasting
OK, I'm happy enough to just land this.
7 years, 7 months ago (2013-05-17 17:55:58 UTC) #7
Peter Kasting
7 years, 7 months ago (2013-05-17 17:57:26 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 manually as r200850 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698