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

Unified Diff: chrome/browser/ui/cocoa/gradient_button_cell.mm

Issue 6889025: Mac. Ensure no more than one visibly selected item in each bookmark folder menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/ui/cocoa/gradient_button_cell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/gradient_button_cell.mm
===================================================================
--- chrome/browser/ui/cocoa/gradient_button_cell.mm (revision 83803)
+++ chrome/browser/ui/cocoa/gradient_button_cell.mm (working copy)
@@ -723,7 +723,7 @@
[self updateTrackingAreas];
}
-- (void)updateTrackingAreas {
+- (BOOL)isMouseReallyInside {
BOOL mouseInView = NO;
NSView* controlView = [self controlView];
NSWindow* window = [controlView window];
@@ -733,7 +733,13 @@
mousePoint = [controlView convertPointFromBase:mousePoint];
mouseInView = [controlView mouse:mousePoint inRect:bounds];
}
+ return mouseInView;
+}
+- (void)updateTrackingAreas {
+ NSView* controlView = [self controlView];
+ BOOL mouseInView = [self isMouseReallyInside];
+
if (trackingArea_.get())
[controlView removeTrackingArea:trackingArea_];
@@ -743,12 +749,12 @@
options |= NSTrackingAssumeInside;
trackingArea_.reset([[NSTrackingArea alloc]
- initWithRect:bounds
+ initWithRect:[controlView bounds]
options:options
owner:self
userInfo:nil]);
if (isMouseInside_ != mouseInView) {
- isMouseInside_ = mouseInView;
+ [self setMouseInside:mouseInView animate:NO];
[controlView setNeedsDisplay:YES];
}
}
« no previous file with comments | « chrome/browser/ui/cocoa/gradient_button_cell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698