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

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: Sync and merge. 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
« 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 f68a198c5b338b4085ab7f934248ee12e4fd43f8..6e98f7c519a2cdc448d5b9ab4117a78e30bac460 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 is_default() const { return is_default_; }
void SetIsDefault(bool is_default);
- // 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;
@@ -117,8 +119,8 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
// current context;
bool is_default_;
- // 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);
};
« 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