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

Side by Side Diff: ui/views/controls/button/label_button.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/message_center/views/bounded_label.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Get or set the text's multi-line property to break on '\n', etc. 46 // Get or set the text's multi-line property to break on '\n', etc.
47 bool GetTextMultiLine() const; 47 bool GetTextMultiLine() const;
48 void SetTextMultiLine(bool text_multi_line); 48 void SetTextMultiLine(bool text_multi_line);
49 49
50 // Get or set the font list used by this button. 50 // Get or set the font list used by this button.
51 const gfx::FontList& GetFontList() const; 51 const gfx::FontList& GetFontList() const;
52 void SetFontList(const gfx::FontList& font_list); 52 void SetFontList(const gfx::FontList& font_list);
53 53
54 // Set the elide behavior of this button. 54 // Set the elide behavior of this button.
55 void SetElideBehavior(Label::ElideBehavior elide_behavior); 55 void SetElideBehavior(gfx::ElideBehavior elide_behavior);
56 56
57 // Get or set the horizontal alignment used for the button; reversed in RTL. 57 // Get or set the horizontal alignment used for the button; reversed in RTL.
58 // The optional image will lead the text, unless the button is right-aligned. 58 // The optional image will lead the text, unless the button is right-aligned.
59 gfx::HorizontalAlignment GetHorizontalAlignment() const; 59 gfx::HorizontalAlignment GetHorizontalAlignment() const;
60 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment); 60 void SetHorizontalAlignment(gfx::HorizontalAlignment alignment);
61 61
62 // Call set_min_size(gfx::Size()) to clear the monotonically increasing size. 62 // Call set_min_size(gfx::Size()) to clear the monotonically increasing size.
63 void set_min_size(const gfx::Size& min_size) { min_size_ = min_size; } 63 void set_min_size(const gfx::Size& min_size) { min_size_ = min_size; }
64 void set_max_size(const gfx::Size& max_size) { max_size_ = max_size; } 64 void set_max_size(const gfx::Size& max_size) { max_size_ = max_size; }
65 65
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 bool border_is_themed_border_; 164 bool border_is_themed_border_;
165 165
166 scoped_ptr<Painter> focus_painter_; 166 scoped_ptr<Painter> focus_painter_;
167 167
168 DISALLOW_COPY_AND_ASSIGN(LabelButton); 168 DISALLOW_COPY_AND_ASSIGN(LabelButton);
169 }; 169 };
170 170
171 } // namespace views 171 } // namespace views
172 172
173 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 173 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/message_center/views/bounded_label.cc ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698