diff options
author | treib@chromium.org <treib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-23 15:52:58 +0000 |
---|---|---|
committer | treib@chromium.org <treib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-23 15:52:58 +0000 |
commit | 41c0d7c13a675913f1c5487fdda190dbe2e42254 (patch) | |
tree | 91914054aa8ca315694201060ac85500a45a803d /ui/views/widget/tooltip_manager.cc | |
parent | db7f69c15894cf0105f10be60f12e9547f74d8f9 (diff) | |
download | chromium_src-41c0d7c13a675913f1c5487fdda190dbe2e42254.zip chromium_src-41c0d7c13a675913f1c5487fdda190dbe2e42254.tar.gz chromium_src-41c0d7c13a675913f1c5487fdda190dbe2e42254.tar.bz2 |
New avatar button: Consolidate text elision between Mac and Win/Linux
This is a cleanup, as discussed in the comments of https://codereview.chromium.org/287103004/
This turned out to require extending gfx::TruncateString with an extra BreakType parameter; it now supports breaking within words as well as at word boundaries. All call sites have been updated accordingly.
BUG=none
Review URL: https://codereview.chromium.org/381953002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284933 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/widget/tooltip_manager.cc')
-rw-r--r-- | ui/views/widget/tooltip_manager.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/views/widget/tooltip_manager.cc b/ui/views/widget/tooltip_manager.cc index f1a85fe..00bd036 100644 --- a/ui/views/widget/tooltip_manager.cc +++ b/ui/views/widget/tooltip_manager.cc @@ -30,7 +30,7 @@ int TooltipManager::GetMaxWidth(const gfx::Display& display) { void TooltipManager::TrimTooltipText(base::string16* text) { // Clamp the tooltip length to kMaxTooltipLength so that we don't // accidentally DOS the user with a mega tooltip. - *text = gfx::TruncateString(*text, kMaxTooltipLength); + *text = gfx::TruncateString(*text, kMaxTooltipLength, gfx::WORD_BREAK); } } // namespace views |