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

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

Issue 613753003: Fix TooltipAura initial sizing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_aura.cc
diff --git a/ui/views/corewm/tooltip_aura.cc b/ui/views/corewm/tooltip_aura.cc
index 77bad4060c220f3cba6ed6908830a84f237c7db3..02117a8593d11df38dc6cf2a98e4d8a0ff0d50e8 100644
--- a/ui/views/corewm/tooltip_aura.cc
+++ b/ui/views/corewm/tooltip_aura.cc
@@ -190,7 +190,6 @@ void TooltipAura::SetText(aura::Window* window,
TrimTooltipToFit(label_.font_list(), GetMaxWidth(location), &trimmed_text,
&max_width, &line_count);
label_.SetText(trimmed_text);
- label_.SizeToFit(max_width + label_.GetInsets().width());
if (!widget_) {
widget_ = CreateTooltipWidget(tooltip_window_);
@@ -198,6 +197,7 @@ void TooltipAura::SetText(aura::Window* window,
widget_->AddObserver(this);
}
+ label_.SizeToFit(max_width + label_.GetInsets().width());
SetTooltipBounds(location, label_.size());
ui::NativeTheme* native_theme = widget_->GetNativeTheme();
« 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