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

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

Issue 11262002: Merge TextButton and LabelButton border images util structs, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add friend tests, remove unused variable. Created 8 years, 2 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/label_button.h ('k') | ui/views/controls/button/label_button_border.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button.cc
diff --git a/ui/views/controls/button/label_button.cc b/ui/views/controls/button/label_button.cc
index d2c6a3e2c344650506fc9f40e1a33ad3d18ba01e..caf64ec33291e707c48a1b0c8d250f1e218b0dd3 100644
--- a/ui/views/controls/button/label_button.cc
+++ b/ui/views/controls/button/label_button.cc
@@ -16,25 +16,25 @@
#include "ui/base/native_theme/native_theme_win.h"
#endif
-namespace views {
-
namespace {
// The spacing between the icon and text.
-static const int kSpacing = 5;
+const int kSpacing = 5;
// The length of the hover fade animation.
-static const int kHoverAnimationDurationMs = 170;
+const int kHoverAnimationDurationMs = 170;
} // namespace
+namespace views {
+
LabelButton::LabelButton(ButtonListener* listener, const string16& text)
: CustomButton(listener),
image_(new ImageView()),
label_(new Label(text)),
default_button_(false),
native_theme_(false) {
- set_border(new LabelButtonBorder(this));
+ set_border(new LabelButtonBorder());
// Inset the button focus rect from the actual border; roughly match Windows.
set_focus_border(FocusBorder::CreateDashedFocusBorder(3, 3, 3, 3));
SetAnimationDuration(kHoverAnimationDurationMs);
« no previous file with comments | « ui/views/controls/button/label_button.h ('k') | ui/views/controls/button/label_button_border.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698