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

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

Issue 12330002: Add views::Button style enum for LabelButton [native] styling, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add views::Button style enum for LabelButton [native] styling, etc. Created 7 years, 10 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
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 df9910cd708388ece37f97fa9f9221b0e8a64810..ccf5e5f6d35df6e61286a021923eba50f13e2639 100644
--- a/ui/views/controls/button/label_button.h
+++ b/ui/views/controls/button/label_button.h
@@ -20,6 +20,8 @@ namespace views {
class VIEWS_EXPORT LabelButton : public CustomButton,
public NativeThemeDelegate {
public:
+ static const char kViewClassName[];
+
LabelButton(ButtonListener* listener, const string16& text);
virtual ~LabelButton();
@@ -56,12 +58,13 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
bool default_button() const { return default_button_; }
void SetDefaultButton(bool default_button);
- // Get or set the option to use a native button appearance; false by default.
- bool native_theme() const { return native_theme_; }
- void SetNativeTheme(bool native_theme);
+ // Get or set the button's overall style; the default is |STYLE_TEXTBUTTON|.
+ ButtonStyle style() const { return style_; }
+ void SetStyle(ButtonStyle style);
// Overridden from View:
virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual std::string GetClassName() const OVERRIDE;
private:
FRIEND_TEST_ALL_PREFIXES(LabelButtonTest, Init);
@@ -78,7 +81,6 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
// Overridden from View:
virtual void Layout() OVERRIDE;
- virtual std::string GetClassName() const OVERRIDE;
virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE;
@@ -115,8 +117,8 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
// Flag indicating default handling of the return key via an accelerator.
bool default_button_;
- // Flag indicating native theme styling (or Views styling) of the button.
- bool native_theme_;
+ // The button's overall style.
+ ButtonStyle style_;
DISALLOW_COPY_AND_ASSIGN(LabelButton);
};

Powered by Google App Engine
This is Rietveld 408576698