mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
plain don't allow rollover on 10.4, and pushing a button will select a cell on 10.4 (to avoid flashing)
This commit is contained in:
parent
4506f61a9e
commit
69a6978fca
2 changed files with 8 additions and 3 deletions
|
@ -359,6 +359,7 @@
|
|||
NSTrackingAreaOptions controlOptions = options;
|
||||
if (NSMouseInRect(mouseLocation, controlButtonRect, [controlView isFlipped]))
|
||||
{
|
||||
#warning update control view
|
||||
controlOptions |= NSTrackingAssumeInside;
|
||||
[controlView setNeedsDisplayInRect: controlButtonRect];
|
||||
}
|
||||
|
@ -390,12 +391,12 @@
|
|||
|
||||
- (void) setControlHover: (BOOL) hover
|
||||
{
|
||||
fHoverControl = hover;
|
||||
fHoverControl = [NSApp isOnLeopardOrBetter] ? hover : -1;
|
||||
}
|
||||
|
||||
- (void) setRevealHover: (BOOL) hover
|
||||
{
|
||||
fHoverReveal = hover;
|
||||
fHoverReveal = [NSApp isOnLeopardOrBetter] ? hover : -1;
|
||||
}
|
||||
|
||||
- (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) controlView
|
||||
|
|
|
@ -94,6 +94,9 @@
|
|||
{
|
||||
[super updateTrackingAreas];
|
||||
|
||||
fMouseControlRow = -1;
|
||||
fMouseRevealRow = -1;
|
||||
|
||||
NSEnumerator * enumerator = [[self trackingAreas] objectEnumerator];
|
||||
NSTrackingArea * area;
|
||||
while ((area = [enumerator nextObject]))
|
||||
|
@ -160,7 +163,8 @@
|
|||
NSPoint point = [self convertPoint: [event locationInWindow] fromView: nil];
|
||||
|
||||
//if pushing a button, don't change the selected rows
|
||||
if ([self pointInControlRect: point] || [self pointInRevealRect: point] || [self pointInActionRect: point])
|
||||
if ([NSApp isOnLeopardOrBetter] && ([self pointInControlRect: point] || [self pointInRevealRect: point]
|
||||
|| [self pointInActionRect: point]))
|
||||
fSelectedIndexes = [[self selectedRowIndexes] retain];
|
||||
|
||||
[super mouseDown: event];
|
||||
|
|
Loading…
Reference in a new issue