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

Unified Diff: ui/views/controls/label.cc

Issue 10834207: aura: Long launcher tooltips should elide at end. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« ui/views/controls/label.h ('K') | « ui/views/controls/label.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label.cc
diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
index 9412a6ab792a2827454cdbd828ea5ca720eb9828..7c07124e10fdbafa5ad34d2c8d0dc233507bf29d 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -360,6 +360,7 @@ void Label::Init(const string16& text, const gfx::Font& font) {
is_multi_line_ = false;
allow_character_break_ = false;
elide_in_middle_ = false;
+ elide_at_end_ = false;
is_email_ = false;
collapse_when_hidden_ = false;
directionality_mode_ = USE_UI_DIRECTIONALITY;
@@ -488,6 +489,9 @@ void Label::CalculateDrawStringParams(string16* paint_text,
} else if (elide_in_middle_) {
*paint_text = ui::ElideText(text_, font_, GetAvailableRect().width(),
ui::ELIDE_IN_MIDDLE);
+ } else if (elide_at_end_) {
+ *paint_text = ui::ElideText(text_, font_, GetAvailableRect().width(),
+ ui::ELIDE_AT_END);
} else {
*paint_text = text_;
}
« ui/views/controls/label.h ('K') | « ui/views/controls/label.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698