mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-28 07:33:14 -04:00
Use cursor-icon crate for CursorIcon
This crate is aimed to simplify handling of cursor icon across various crates and be used in the public API.
This commit is contained in:
@@ -197,8 +197,7 @@ impl NSCursor {
|
||||
pub fn from_icon(icon: CursorIcon) -> Id<Self, Shared> {
|
||||
match icon {
|
||||
CursorIcon::Default => Default::default(),
|
||||
CursorIcon::Arrow => Self::arrowCursor(),
|
||||
CursorIcon::Hand => Self::pointingHandCursor(),
|
||||
CursorIcon::Pointer => Self::pointingHandCursor(),
|
||||
CursorIcon::Grab => Self::openHandCursor(),
|
||||
CursorIcon::Grabbing => Self::closedHandCursor(),
|
||||
CursorIcon::Text => Self::IBeamCursor(),
|
||||
@@ -228,6 +227,7 @@ impl NSCursor {
|
||||
CursorIcon::Wait | CursorIcon::Progress => Self::busyButClickableCursor(),
|
||||
CursorIcon::Move | CursorIcon::AllScroll => Self::moveCursor(),
|
||||
CursorIcon::Cell => Self::cellCursor(),
|
||||
_ => Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user