mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
fix hovering over the pause/resume button in non-compact view
This commit is contained in:
parent
05cf5fccef
commit
19d1e5dc23
1 changed files with 18 additions and 18 deletions
|
@ -246,25 +246,25 @@
|
||||||
[controlView addTrackingArea: area];
|
[controlView addTrackingArea: area];
|
||||||
[rowInfo release];
|
[rowInfo release];
|
||||||
[area release];
|
[area release];
|
||||||
|
|
||||||
//control button
|
|
||||||
NSRect controlButtonRect = [self controlButtonRectForBounds: cellFrame];
|
|
||||||
NSTrackingAreaOptions controlOptions = options;
|
|
||||||
if (NSMouseInRect(mouseLocation, controlButtonRect, [controlView isFlipped]))
|
|
||||||
{
|
|
||||||
controlOptions |= NSTrackingAssumeInside;
|
|
||||||
[(TorrentTableView *)controlView setControlButtonHover: [[userInfo objectForKey: @"Row"] integerValue]];
|
|
||||||
}
|
|
||||||
|
|
||||||
NSMutableDictionary * controlInfo = [userInfo mutableCopy];
|
|
||||||
[controlInfo setObject: @"Control" forKey: @"Type"];
|
|
||||||
area = [[NSTrackingArea alloc] initWithRect: controlButtonRect options: controlOptions owner: controlView
|
|
||||||
userInfo: controlInfo];
|
|
||||||
[controlView addTrackingArea: area];
|
|
||||||
[controlInfo release];
|
|
||||||
[area release];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//control button
|
||||||
|
NSRect controlButtonRect = [self controlButtonRectForBounds: cellFrame];
|
||||||
|
NSTrackingAreaOptions controlOptions = options;
|
||||||
|
if (NSMouseInRect(mouseLocation, controlButtonRect, [controlView isFlipped]))
|
||||||
|
{
|
||||||
|
controlOptions |= NSTrackingAssumeInside;
|
||||||
|
[(TorrentTableView *)controlView setControlButtonHover: [[userInfo objectForKey: @"Row"] integerValue]];
|
||||||
|
}
|
||||||
|
|
||||||
|
NSMutableDictionary * controlInfo = [userInfo mutableCopy];
|
||||||
|
[controlInfo setObject: @"Control" forKey: @"Type"];
|
||||||
|
NSTrackingArea * area = [[NSTrackingArea alloc] initWithRect: controlButtonRect options: controlOptions owner: controlView
|
||||||
|
userInfo: controlInfo];
|
||||||
|
[controlView addTrackingArea: area];
|
||||||
|
[controlInfo release];
|
||||||
|
[area release];
|
||||||
|
|
||||||
//reveal button
|
//reveal button
|
||||||
NSRect revealButtonRect = [self revealButtonRectForBounds: cellFrame];
|
NSRect revealButtonRect = [self revealButtonRectForBounds: cellFrame];
|
||||||
NSTrackingAreaOptions revealOptions = options;
|
NSTrackingAreaOptions revealOptions = options;
|
||||||
|
@ -276,7 +276,7 @@
|
||||||
|
|
||||||
NSMutableDictionary * revealInfo = [userInfo mutableCopy];
|
NSMutableDictionary * revealInfo = [userInfo mutableCopy];
|
||||||
[revealInfo setObject: @"Reveal" forKey: @"Type"];
|
[revealInfo setObject: @"Reveal" forKey: @"Type"];
|
||||||
NSTrackingArea * area = [[NSTrackingArea alloc] initWithRect: revealButtonRect options: revealOptions owner: controlView
|
area = [[NSTrackingArea alloc] initWithRect: revealButtonRect options: revealOptions owner: controlView
|
||||||
userInfo: revealInfo];
|
userInfo: revealInfo];
|
||||||
[controlView addTrackingArea: area];
|
[controlView addTrackingArea: area];
|
||||||
[revealInfo release];
|
[revealInfo release];
|
||||||
|
|
Loading…
Reference in a new issue