summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/gradient_button_cell.h
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-27 23:51:17 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-27 23:51:17 +0000
commit9b5d7374459f0deee6dbf7a5aa4dc43aec25e38c (patch)
tree06f68e313e76256c0245f7082dba8e6b23d7569e /chrome/browser/cocoa/gradient_button_cell.h
parent15123a7ca58102854802075f6efb3c5e5cc23e23 (diff)
downloadchromium_src-9b5d7374459f0deee6dbf7a5aa4dc43aec25e38c.zip
chromium_src-9b5d7374459f0deee6dbf7a5aa4dc43aec25e38c.tar.gz
chromium_src-9b5d7374459f0deee6dbf7a5aa4dc43aec25e38c.tar.bz2
Updates to clean up default theme and add hover states.
Patch by Cole. BUG=http://crbug.com/18573;http://crbug.com/18574;http://crbug.com/18360;http://crbug.com/18438 TEST=none Review URL: http://codereview.chromium.org/165499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24700 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/gradient_button_cell.h')
-rw-r--r--chrome/browser/cocoa/gradient_button_cell.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/gradient_button_cell.h b/chrome/browser/cocoa/gradient_button_cell.h
index e9b4e79..7308b6c 100644
--- a/chrome/browser/cocoa/gradient_button_cell.h
+++ b/chrome/browser/cocoa/gradient_button_cell.h
@@ -34,6 +34,8 @@ typedef NSInteger ButtonType;
BOOL isMouseInside_;
scoped_nsobject<NSTrackingArea> trackingArea_;
BOOL shouldTheme_;
+ CGFloat hoverAlpha_; // 0-1. Controls the alpha during mouse hover
+ NSTimeInterval lastHoverUpdate_;
scoped_nsobject<NSGradient> gradient_;
scoped_nsobject<NSImage> underlayImage_;
}
@@ -45,8 +47,9 @@ typedef NSInteger ButtonType;
controlView:(NSView*)controlView
outerPath:(NSBezierPath*)outerPath
innerPath:(NSBezierPath*)innerPath
- showHighlightGradient:(BOOL)showHighlightGradient
showClickedGradient:(BOOL)showClickedGradient
+ showHighlightGradient:(BOOL)showHighlightGradient
+ hoverAlpha:(CGFloat)hoverAlpha
active:(BOOL)active
cellFrame:(NSRect)cellFrame;
@@ -54,6 +57,11 @@ typedef NSInteger ButtonType;
- (NSImage*)underlayImage;
- (void)setUnderlayImage:(NSImage*)image;
+// Let the view know when the mouse moves in and out. A timer will update
+// the current hoverAlpha_ based on these events.
+- (void)setMouseInside:(BOOL)flag animate:(BOOL)animate;
+
+@property(assign, nonatomic)CGFloat hoverAlpha;
@end
@interface GradientButtonCell(TestingAPI)