summaryrefslogtreecommitdiffstats
path: root/views/controls/button
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 19:42:11 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 19:42:11 +0000
commit7cf368d8e41dce78f5ab8920f3f048c97b96876c (patch)
treeff030a57ae4c900e24ff27f7f0a52e21e6cf4b52 /views/controls/button
parent0401df24e2cb038578346e09be9e4bc108bc363e (diff)
downloadchromium_src-7cf368d8e41dce78f5ab8920f3f048c97b96876c.zip
chromium_src-7cf368d8e41dce78f5ab8920f3f048c97b96876c.tar.gz
chromium_src-7cf368d8e41dce78f5ab8920f3f048c97b96876c.tar.bz2
Gets bookmark menu working on linux. There are just a handful of
NOTIMPLEMENTEDs to resolve (initiating drags is the biggest remaining issue). I'll tackle the remaining issues separately. BUG=none TEST=make sure bookmark menus work well on windows still. Review URL: http://codereview.chromium.org/173431 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/button')
-rw-r--r--views/controls/button/text_button.cc9
-rw-r--r--views/controls/button/text_button.h6
2 files changed, 12 insertions, 3 deletions
diff --git a/views/controls/button/text_button.cc b/views/controls/button/text_button.cc
index a31f6c9..b5733c0 100644
--- a/views/controls/button/text_button.cc
+++ b/views/controls/button/text_button.cc
@@ -21,9 +21,12 @@ static const int kIconTextPadding = 5;
static const int kPreferredPaddingHorizontal = 6;
static const int kPreferredPaddingVertical = 5;
-static const SkColor kEnabledColor = SkColorSetRGB(6, 45, 117);
-static const SkColor kHighlightColor = SkColorSetARGB(200, 255, 255, 255);
-static const SkColor kDisabledColor = SkColorSetRGB(161, 161, 146);
+// static
+const SkColor TextButton::kEnabledColor = SkColorSetRGB(6, 45, 117);
+// static
+const SkColor TextButton::kHighlightColor = SkColorSetARGB(200, 255, 255, 255);
+// static
+const SkColor TextButton::kDisabledColor = SkColorSetRGB(161, 161, 146);
// How long the hover fade animation should last.
static const int kHoverAnimationDurationMs = 170;
diff --git a/views/controls/button/text_button.h b/views/controls/button/text_button.h
index e18ef59..3fbc2b4 100644
--- a/views/controls/button/text_button.h
+++ b/views/controls/button/text_button.h
@@ -7,6 +7,7 @@
#include "app/gfx/font.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/core/SkColor.h"
#include "views/border.h"
#include "views/controls/button/custom_button.h"
@@ -102,6 +103,11 @@ class TextButton : public CustomButton {
virtual gfx::Size GetMinimumSize();
virtual void SetEnabled(bool enabled);
+ // Text colors.
+ static const SkColor kEnabledColor;
+ static const SkColor kHighlightColor;
+ static const SkColor kDisabledColor;
+
protected:
virtual bool OnMousePressed(const MouseEvent& e);
virtual void Paint(gfx::Canvas* canvas);