mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
tweaks to showing priority selector
This commit is contained in:
parent
a0578f408b
commit
0b3739dace
2 changed files with 7 additions and 5 deletions
|
@ -117,11 +117,14 @@
|
||||||
[self removeTrackingArea: area];
|
[self removeTrackingArea: area];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NSRange visibleRows = [self rowsInRect: [self visibleRect]];
|
||||||
|
if (visibleRows.length == 0){NSLog(@"asdgshs");
|
||||||
|
return;}
|
||||||
|
|
||||||
int col = [self columnWithIdentifier: @"Priority"];
|
int col = [self columnWithIdentifier: @"Priority"];
|
||||||
NSTrackingAreaOptions options = NSTrackingEnabledDuringMouseDrag | NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways;
|
NSTrackingAreaOptions options = NSTrackingEnabledDuringMouseDrag | NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways;
|
||||||
NSPoint mouseLocation = [self convertPoint: [[self window] convertScreenToBase: [NSEvent mouseLocation]] fromView: nil];
|
NSPoint mouseLocation = [self convertPoint: [[self window] convertScreenToBase: [NSEvent mouseLocation]] fromView: nil];
|
||||||
|
|
||||||
NSRange visibleRows = [self rowsInRect: [self visibleRect]];
|
|
||||||
int row;
|
int row;
|
||||||
for (row = visibleRows.location; row < NSMaxRange(visibleRows); row++)
|
for (row = visibleRows.location; row < NSMaxRange(visibleRows); row++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -90,14 +90,13 @@
|
||||||
{
|
{
|
||||||
NSTrackingAreaOptions options = NSTrackingEnabledDuringMouseDrag | NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways;
|
NSTrackingAreaOptions options = NSTrackingEnabledDuringMouseDrag | NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways;
|
||||||
|
|
||||||
BOOL mouseIsInside = NSMouseInRect(mouseLocation, cellFrame, [controlView isFlipped]);
|
if (NSMouseInRect(mouseLocation, cellFrame, [controlView isFlipped]))
|
||||||
if (mouseIsInside)
|
|
||||||
{
|
{
|
||||||
options |= NSTrackingAssumeInside;
|
options |= NSTrackingAssumeInside;
|
||||||
[controlView setNeedsDisplayInRect:cellFrame];
|
[controlView setNeedsDisplayInRect: cellFrame];
|
||||||
}
|
}
|
||||||
|
|
||||||
NSTrackingArea *area = [[NSTrackingArea alloc] initWithRect: cellFrame options: options owner: controlView userInfo: userInfo];
|
NSTrackingArea * area = [[NSTrackingArea alloc] initWithRect: cellFrame options: options owner: controlView userInfo: userInfo];
|
||||||
[controlView addTrackingArea: area];
|
[controlView addTrackingArea: area];
|
||||||
[area release];
|
[area release];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue