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

Unified Diff: ui/views/controls/button/label_button.h

Issue 298813002: views: Move MenuButton from TextButton to LabelButton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable DragDirectlyToSecondWindow. 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/views/controls/button/custom_button.h ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.h
diff --git a/ui/views/controls/button/label_button.h b/ui/views/controls/button/label_button.h
index 8e13ffc8cd58611d167d1cc147b309ce4a378b6b..425f5c02864075b998569fafb09d78366643a2b9 100644
--- a/ui/views/controls/button/label_button.h
+++ b/ui/views/controls/button/label_button.h
@@ -38,11 +38,14 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
// Get or set the text shown on the button.
const base::string16& GetText() const;
- void SetText(const base::string16& text);
+ virtual void SetText(const base::string16& text);
// Set the text color shown for the specified button state.
void SetTextColor(ButtonState for_state, SkColor color);
+ // Sets a halo color on the label.
+ void SetHaloColor(SkColor color);
+
// Get or set the text's multi-line property to break on '\n', etc.
bool GetTextMultiLine() const;
void SetTextMultiLine(bool text_multi_line);
@@ -72,6 +75,7 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
void SetStyle(ButtonStyle style);
void SetFocusPainter(scoped_ptr<Painter> focus_painter);
+ Painter* focus_painter() { return focus_painter_.get(); }
// View:
virtual void SetBorder(scoped_ptr<Border> border) OVERRIDE;
@@ -83,6 +87,10 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
ImageView* image() const { return image_; }
Label* label() const { return label_; }
+ // Returns the available area for the label and image. Subclasses can change
+ // these bounds if they need room to do manual painting.
+ virtual gfx::Rect GetChildAreaBounds();
+
// View:
virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
virtual void OnFocus() OVERRIDE;
« no previous file with comments | « ui/views/controls/button/custom_button.h ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698