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

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

Issue 14322007: Add line height setting to views::Label & use it for notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 8 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/views/controls/button/text_button.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label.h
diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h
index 6edabf7b62f8981ae3f3d59da9f683b9ae37ad4c..e7d4fcaa74871d7d057f11f95cdb37b42b80af02 100644
--- a/ui/views/controls/label.h
+++ b/ui/views/controls/label.h
@@ -117,6 +117,12 @@ class VIEWS_EXPORT Label : public View {
return directionality_mode_;
}
+ // Get or set the distance in pixels between baselines of multi-line text.
+ // Default is 0, indicating the distance between lines should be the standard
+ // one for the label's text, font, and platform.
+ int line_height() const { return line_height_; }
+ void SetLineHeight(int height);
+
// Get or set if the label text can wrap on multiple lines; default is false.
bool is_multi_line() const { return is_multi_line_; }
void SetMultiLine(bool multi_line);
@@ -242,6 +248,7 @@ class VIEWS_EXPORT Label : public View {
bool auto_color_readability_;
mutable gfx::Size text_size_;
mutable bool text_size_valid_;
+ int line_height_;
bool is_multi_line_;
bool allow_character_break_;
ElideBehavior elide_behavior_;
« no previous file with comments | « ui/views/controls/button/text_button.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698