UI: Use busyButClickableCursor for MacOS Wait Cursor
MacOS is currently using one of our custom "hourglass" cursors during busy times. This PR changes it to an OS-supplied cursor, a pointer arrow with an animated blue spinner, meant for this purpose. Although undocumented it has been used by many applications for many years. Including Firefox for 11 years now. Pull Request: https://projects.blender.org/blender/blender/pulls/136735
This commit is contained in:
committed by
Harley Acheson
parent
a1c7f6d3e1
commit
8325e7f5e4
@@ -1003,6 +1003,12 @@ static NSCursor *getImageCursor(GHOST_TStandardCursor shape, NSString *name, NSP
|
||||
return cursors[index];
|
||||
}
|
||||
|
||||
/* busyButClickableCursor is an undocumented NSCursor API, but
|
||||
* has been in use since at least OS X 10.4 and through 10.9. */
|
||||
@interface NSCursor (Undocumented)
|
||||
+ (NSCursor *)busyButClickableCursor;
|
||||
@end
|
||||
|
||||
NSCursor *GHOST_WindowCocoa::getStandardCursor(GHOST_TStandardCursor shape) const
|
||||
{
|
||||
@autoreleasepool {
|
||||
@@ -1046,6 +1052,11 @@ NSCursor *GHOST_WindowCocoa::getStandardCursor(GHOST_TStandardCursor shape) cons
|
||||
return [NSCursor pointingHandCursor];
|
||||
case GHOST_kStandardCursorDefault:
|
||||
return [NSCursor arrowCursor];
|
||||
case GHOST_kStandardCursorWait:
|
||||
if ([NSCursor respondsToSelector:@selector(busyButClickableCursor)]) {
|
||||
return [NSCursor busyButClickableCursor];
|
||||
}
|
||||
return nullptr;
|
||||
case GHOST_kStandardCursorKnife:
|
||||
return getImageCursor(shape, @"knife.pdf", NSMakePoint(6, 24));
|
||||
case GHOST_kStandardCursorEraser:
|
||||
|
||||
Reference in New Issue
Block a user