Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4178)

Unified Diff: chrome/browser/cocoa/gradient_button_cell.h

Issue 165499: Updates to clean up default theme and add hover states (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/download_item_cell.mm ('k') | chrome/browser/cocoa/gradient_button_cell.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/gradient_button_cell.h
===================================================================
--- chrome/browser/cocoa/gradient_button_cell.h (revision 24798)
+++ chrome/browser/cocoa/gradient_button_cell.h (working copy)
@@ -34,6 +34,8 @@
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 @@
controlView:(NSView*)controlView
outerPath:(NSBezierPath*)outerPath
innerPath:(NSBezierPath*)innerPath
+ showClickedGradient:(BOOL)showClickedGradient
showHighlightGradient:(BOOL)showHighlightGradient
- showClickedGradient:(BOOL)showClickedGradient
+ hoverAlpha:(CGFloat)hoverAlpha
active:(BOOL)active
cellFrame:(NSRect)cellFrame;
@@ -54,6 +57,11 @@
- (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)
« no previous file with comments | « chrome/browser/cocoa/download_item_cell.mm ('k') | chrome/browser/cocoa/gradient_button_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698