-
Notifications
You must be signed in to change notification settings - Fork 791
Custom Cursor #6923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Custom Cursor #6923
Conversation
|
Looking for feedback, There are a few things I was unsure of. The |
|
Thanks for the contribution! Custom cursor images is a nice feature. However, I think this would fit better as an extension of the existing We could change the type of the mouse-cursor property to support either the predefined MouseCursor enum or a custom cursor struct (e.g., That said, I realize this would be a more complex change, especially around adding implicit conversions or supporting both the enum and a struct. So, I’d be happy to guide you through it if you’re interested. Or we could still consider to add a simpler approach with a (Note that the Thanks again for contributing to Slint! We really appreciate your effort. Sorry that we’re not taking that as is, but we want to make sure the API is well-designed since we need to maintain it and keep compatibility in the long run. 😊 |
Yeah, that would be great!
|
|
Indeed, enums in data aren't currently supported by the macro for declaring Slint enums in
Either way, we'd likely need an enum similar to As for accessing the winit event loop, you can use Let me know if you need any further guidance! 😊 |
|
This would be a great feature for the live-preview tools. There are a couple of areas where a custom cursor to indicate numbers can be scrolled would help. The current list of cursors doens't cover this or look a bit old fashioned on Mac. Color picker (as in select pixels color under the mouse to copy), and also some tools that would manipulate objects in the live-preview visual editor. |
|
@TheColorRed I happen to need this feature, do you have interest in continuing the PR? I can take it over |
|
@redstrate Please take it over. It's been sitting there for a year now. Maybe continue with the branch so you both get commit credit? I also have several uses for this and would love to make an example unless you also want to do this. |
Sure go ahead and take it over. |
|
I continued it in #10256, however it's not quite ready to review yet 😃 I also need to pull in this branch for the winit support |
Allows the user to use a custom window cursor.
Example usage: