summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/gradient_button_cell.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cocoa/gradient_button_cell.h')
-rw-r--r--chrome/browser/cocoa/gradient_button_cell.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/gradient_button_cell.h b/chrome/browser/cocoa/gradient_button_cell.h
index e9b4e79..79be6ff 100644
--- a/chrome/browser/cocoa/gradient_button_cell.h
+++ b/chrome/browser/cocoa/gradient_button_cell.h
@@ -34,7 +34,8 @@ typedef NSInteger ButtonType;
BOOL isMouseInside_;
scoped_nsobject<NSTrackingArea> trackingArea_;
BOOL shouldTheme_;
- scoped_nsobject<NSGradient> gradient_;
+ CGFloat hoverAlpha_; // 0-1. Controls the alpha during mouse hover
+ NSTimeInterval lastHoverUpdate_;
scoped_nsobject<NSImage> underlayImage_;
}
@@ -45,8 +46,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 +56,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)