Bug 411273 - Switch busy/wait cursor on OS X to use the system's busyButClickableCursor. r=smichaud

This commit is contained in:
Josiah Bruner 2014-01-14 09:36:41 -05:00
parent d70a5c056e
commit f7004e96b0
6 changed files with 7 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -56,4 +56,10 @@
+ (void) dispose;
@end
@interface NSCursor (Undocumented)
// busyButClickableCursor is an undocumented NSCursor API, but has been in use since
// at least OS X 10.4 and through 10.9.
+ (NSCursor*)busyButClickableCursor;
@end
#endif // nsCursorManager_h_

View File

@ -82,12 +82,7 @@ static const nsCursor sCustomCursor = eCursorCount;
case eCursor_wait:
case eCursor_spinning:
{
NSCursor* cursor1 = [nsMacCursor cocoaCursorWithImageNamed:@"spin1" hotSpot:NSMakePoint(1.0, 1.0)];
NSCursor* cursor2 = [nsMacCursor cocoaCursorWithImageNamed:@"spin2" hotSpot:NSMakePoint(1.0, 1.0)];
NSCursor* cursor3 = [nsMacCursor cocoaCursorWithImageNamed:@"spin3" hotSpot:NSMakePoint(1.0, 1.0)];
NSCursor* cursor4 = [nsMacCursor cocoaCursorWithImageNamed:@"spin4" hotSpot:NSMakePoint(1.0, 1.0)];
NSArray* spinCursorFrames = [[[NSArray alloc] initWithObjects:cursor1, cursor2, cursor3, cursor4, nil] autorelease];
return [nsMacCursor cursorWithFrames:spinCursorFrames type:aCursor];
return [nsMacCursor cursorWithCursor:[NSCursor busyButClickableCursor] type:aCursor];
}
case eCursor_select:
return [nsMacCursor cursorWithCursor:[NSCursor IBeamCursor] type:aCursor];