diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 20:20:51 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 20:20:51 +0000 |
commit | 71f4c1dc80499f254b9f06e510002ff3b43a87e0 (patch) | |
tree | 6eeb8693a47e7990e5bb3995812e2fa641bcda09 /chrome/browser/cocoa/gradient_button_cell.h | |
parent | 7cc6c0ba59df63f9f084f8cdfc695fa7b4ae1823 (diff) | |
download | chromium_src-71f4c1dc80499f254b9f06e510002ff3b43a87e0.zip chromium_src-71f4c1dc80499f254b9f06e510002ff3b43a87e0.tar.gz chromium_src-71f4c1dc80499f254b9f06e510002ff3b43a87e0.tar.bz2 |
Updates to clean up default theme and add hover states.
Path 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@24512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/gradient_button_cell.h')
-rw-r--r-- | chrome/browser/cocoa/gradient_button_cell.h | 11 |
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) |