Open tonsky opened 2 years ago
You may be able to access a range of additional cursors using private methods of NSCursor: https://stackoverflow.com/questions/27242353/cocoa-predefined-resize-mouse-cursor
Also, from the Chromium source, these look relevant: https://github.com/chromium/chromium/blob/main/ui/base/cocoa/cursor_utils.mm https://github.com/chromium/chromium/commit/146be2e5165365b500fd573769c4fb53343d6276
Granted I have no real experience with Objective-C, but it appears to me as though Chromium first attempts to use the hidden system cursors by inheriting NSCursor and setting the private field _type
. If that fails, a fallback image is used. I think this would be the best approach.
Looks great!
macOS is missing NESW/NWSE right now. I guess the solution here would be to provide custom cursors (I think that’s what both browsers and AWT do), then we can cover all the use-cases
See #231 for context