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

Unified Diff: ui/gfx/render_text.h

Issue 312233003: Add fade eliding for Views Labels; related cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refine alignment check; minor additional cleanup. Created 6 years, 6 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/gfx/canvas_skia.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.h
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 759e6272a9c6b3119ffe1bc1f52357f5358bc5af..28129414a7ec9be9a5ac2003b5fff04b9d4653ed 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -256,18 +256,13 @@ class GFX_EXPORT RenderText {
void set_truncate_length(size_t length) { truncate_length_ = length; }
// Elides the text to fit in |display_rect| according to the specified
- // |elide_behavior|. |ELIDE_IN_MIDDLE| is not supported. If both truncate
- // and elide are specified, the shorter of the two will be applicable.
+ // |elide_behavior|. |ELIDE_MIDDLE| is not supported. If a truncate length and
+ // an elide mode are specified, the shorter of the two will be applicable.
void SetElideBehavior(ElideBehavior elide_behavior);
const Rect& display_rect() const { return display_rect_; }
void SetDisplayRect(const Rect& r);
- void set_fade_head(bool fade_head) { fade_head_ = fade_head; }
- bool fade_head() const { return fade_head_; }
- void set_fade_tail(bool fade_tail) { fade_tail_ = fade_tail; }
- bool fade_tail() const { return fade_tail_; }
-
bool background_is_transparent() const { return background_is_transparent_; }
void set_background_is_transparent(bool transparent) {
background_is_transparent_ = transparent;
@@ -534,12 +529,10 @@ class GFX_EXPORT RenderText {
Point ToTextPoint(const Point& point);
Point ToViewPoint(const Point& point);
- // Convert a text space x-coordinate range to corresponding rects in view
- // space.
+ // Convert a text space x-coordinate range to rects in view space.
std::vector<Rect> TextBoundsToViewBounds(const Range& x);
- // Returns the line offset from the origin, accounting for text alignment
- // only.
+ // Returns the line offset from the origin, accounts for text alignment only.
Vector2d GetAlignmentOffset(size_t line_number);
// Applies fade effects to |renderer|.
@@ -663,7 +656,7 @@ class GFX_EXPORT RenderText {
// The maximum length of text to display, 0 forgoes a hard limit.
size_t truncate_length_;
- // The behavior for eliding or truncating.
+ // The behavior for eliding, fading, or truncating.
ElideBehavior elide_behavior_;
// The obscured and/or truncated text that will be displayed.
@@ -673,10 +666,6 @@ class GFX_EXPORT RenderText {
// |display_rect_| as the width cap.
bool multiline_;
- // Fade text head and/or tail, if text doesn't fit into |display_rect_|.
- bool fade_head_;
- bool fade_tail_;
-
// Is the background transparent (either partially or fully)?
bool background_is_transparent_;
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698