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-31 15:17:11 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 15:17:11 +0000
commit203aa8f73aad8d63c836da3d00f1ab52c0021d8b (patch)
tree7a07fa5242f65aaa8522c79259b1e305f2d02de7 /chrome/browser/cocoa/gradient_button_cell.h
parentf6e0b0e9fcf638713d82b8e0cc5b3fcc9d845fef (diff)
downloadchromium_src-203aa8f73aad8d63c836da3d00f1ab52c0021d8b.zip
chromium_src-203aa8f73aad8d63c836da3d00f1ab52c0021d8b.tar.gz
chromium_src-203aa8f73aad8d63c836da3d00f1ab52c0021d8b.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@24881 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)