Skip to content
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

Custom cursor icons #3005

Closed
valaphee opened this issue Aug 4, 2023 · 5 comments
Closed

Custom cursor icons #3005

valaphee opened this issue Aug 4, 2023 · 5 comments
Labels
C - needs discussion Direction must be ironed out S - api Design and usability

Comments

@valaphee
Copy link
Contributor

valaphee commented Aug 4, 2023

At the moment there is no way to use custom cursor icons (except doing it manually).

All major platforms should support custom cursors even on web.

Loading cursor icons would work the same way as other icons on Windows (LoadImageW), but would require a new method in Window or not using "cursor_icon" and adding a new variant "Custom" to CursorIcon.

@madsmtm
Copy link
Member

madsmtm commented Aug 5, 2023

@madsmtm madsmtm added S - api Design and usability C - needs discussion Direction must be ironed out labels Aug 5, 2023
@kchibisov
Copy link
Member

I guess we could do something like

pub enum CursorIcon {
    Named(CursorIcon), // from crate
    Raw(Buffer),
}

The issue is that on Wayland you'd need a scaling, but we can accept physical and say that we'll scale based on display resolution?

@valaphee
Copy link
Contributor Author

What was the reason why CursorIcon resides in its own crate? I found this pr bd9cc2a but I don't think its really worth being in its own crate.

@kchibisov
Copy link
Member

@valaphee it's used by multiple crates(not only winit) and just encodes w3c icons

@Friz64
Copy link
Contributor

Friz64 commented Dec 16, 2023

#3218 has been merged 🎉

@madsmtm madsmtm closed this as completed Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - needs discussion Direction must be ironed out S - api Design and usability
Development

No branches or pull requests

4 participants