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

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

Issue 23731010: Move text_elider to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update3 Created 7 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 | « ui/ui_unittests.gypi ('k') | ui/views/controls/styled_label.cc » ('j') | 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 05f9aedb78034f168dac916ce2c8d85763fc4033..7d4bc7e84703c03dfcbb50ed1f231e991e3b7590 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -16,11 +16,11 @@
#include "base/strings/utf_string_conversions.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/text/text_elider.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/shadow_value.h"
+#include "ui/gfx/text_elider.h"
#include "ui/gfx/text_utils.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/background.h"
@@ -495,14 +495,15 @@ void Label::CalculateDrawStringParams(string16* paint_text,
if (is_multi_line_ || (elide_behavior_ == NO_ELIDE)) {
*paint_text = text_;
} else if (elide_behavior_ == ELIDE_IN_MIDDLE) {
- *paint_text = ui::ElideText(text_, font_list_, GetAvailableRect().width(),
- ui::ELIDE_IN_MIDDLE);
+ *paint_text = gfx::ElideText(text_, font_list_, GetAvailableRect().width(),
+ gfx::ELIDE_IN_MIDDLE);
} else if (elide_behavior_ == ELIDE_AT_END) {
- *paint_text = ui::ElideText(text_, font_list_, GetAvailableRect().width(),
- ui::ELIDE_AT_END);
+ *paint_text = gfx::ElideText(text_, font_list_, GetAvailableRect().width(),
+ gfx::ELIDE_AT_END);
} else {
DCHECK_EQ(ELIDE_AS_EMAIL, elide_behavior_);
- *paint_text = ui::ElideEmail(text_, font_list_, GetAvailableRect().width());
+ *paint_text = gfx::ElideEmail(text_, font_list_,
+ GetAvailableRect().width());
}
*text_bounds = GetTextBounds();
« no previous file with comments | « ui/ui_unittests.gypi ('k') | ui/views/controls/styled_label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698