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

Unified Diff: ui/views/corewm/tooltip_controller.cc

Issue 15772002: views::Label displaying the tooltip should not elide. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/tooltip_controller.cc
diff --git a/ui/views/corewm/tooltip_controller.cc b/ui/views/corewm/tooltip_controller.cc
index 6a0608ea33ce299deb699c4f6108760cce28a3eb..7f93c9e7dd2830106835e4f93493faa2b010e292 100644
--- a/ui/views/corewm/tooltip_controller.cc
+++ b/ui/views/corewm/tooltip_controller.cc
@@ -98,6 +98,7 @@ class TooltipController::Tooltip : public views::WidgetObserver {
kTooltipBorder));
}
label_.set_owned_by_client();
+ label_.SetMultiLine(true);
}
virtual ~Tooltip() {
@@ -119,7 +120,7 @@ class TooltipController::Tooltip : public views::WidgetObserver {
label_.SetText(trimmed_text);
int width = max_width + 2 * kTooltipHorizontalPadding;
- int height = label_.GetPreferredSize().height() +
+ int height = label_.GetHeightForWidth(max_width) +
2 * kTooltipVerticalPadding;
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoDropShadows)) {
width += 2 * kTooltipBorderWidth;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698