diff options
Diffstat (limited to 'views/widget/tooltip_manager.cc')
-rw-r--r-- | views/widget/tooltip_manager.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/views/widget/tooltip_manager.cc b/views/widget/tooltip_manager.cc index 39ccab8..5c400eb9 100644 --- a/views/widget/tooltip_manager.cc +++ b/views/widget/tooltip_manager.cc @@ -7,6 +7,7 @@ #include <vector> #include "app/text_elider.h" +#include "base/utf_string_conversions.h" namespace views { @@ -57,7 +58,8 @@ void TooltipManager::TrimTooltipToFit(std::wstring* text, std::wstring result; for (std::vector<std::wstring>::iterator i = lines.begin(); i != lines.end(); ++i) { - std::wstring elided_text = gfx::ElideText(*i, font, available_width, false); + std::wstring elided_text = UTF16ToWideHack(gfx::ElideText(WideToUTF16Hack( + *i), font, available_width, false)); *max_width = std::max(*max_width, font.GetStringWidth(elided_text)); if (i == lines.begin() && i + 1 == lines.end()) { *text = elided_text; |