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

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

Issue 2801583002: Use views::style for buttons, bootstrap ash_typography to do so. (Closed)
Patch Set: More self review Created 3 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
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 6dade72706233e5cc6a2a7b7f38ed6f8ef09b358..2bc4b88318a3f2d1be1570a6b4f3511eda2e8218 100644
--- a/ui/views/controls/button/label_button.h
+++ b/ui/views/controls/button/label_button.h
@@ -17,6 +17,7 @@
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/native_theme_delegate.h"
+#include "ui/views/style/typography.h"
namespace views {
@@ -33,7 +34,12 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
static const char kViewClassName[];
- LabelButton(ButtonListener* listener, const base::string16& text);
+ // Creates a LabelButton with ButtonPressed() events sent to |listener| and
+ // label |text|. |button_context| is a value from views::style::TextContext
+ // and determines the appearance of |text|.
+ LabelButton(ButtonListener* listener,
+ const base::string16& text,
+ int button_context = style::CONTEXT_BUTTON);
~LabelButton() override;
// Gets or sets the image shown for the specified button state.
@@ -57,9 +63,6 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
// Sets whether subpixel rendering is used on the label.
void SetTextSubpixelRenderingEnabled(bool enabled);
- // Adjusts the font size up or down by the given amount.
- virtual void AdjustFontSize(int font_size_delta);
-
// Sets the elide behavior of this button.
void SetElideBehavior(gfx::ElideBehavior elide_behavior);
@@ -116,9 +119,6 @@ class VIEWS_EXPORT LabelButton : public CustomButton,
// these bounds if they need room to do manual painting.
virtual gfx::Rect GetChildAreaBounds();
- // Sets the font list used by this button.
- virtual void SetFontList(const gfx::FontList& font_list);
-
// View:
void OnPaint(gfx::Canvas* canvas) override;
void OnFocus() override;

Powered by Google App Engine
This is Rietveld 408576698