mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
io/pointer: [API] make cursor name into a byte
Add most of the common cursors defined by different systems. Normalize cursor names to match CSS. This is API change: some cursor names have changed, and the underlying type is no longer a string. Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
@@ -55,21 +55,21 @@ const (
|
||||
func (a Action) CursorName() pointer.CursorName {
|
||||
switch a {
|
||||
case ActionResizeNorthWest:
|
||||
return pointer.CursorTopLeftResize
|
||||
return pointer.CursorNorthWestResize
|
||||
case ActionResizeSouthEast:
|
||||
return pointer.CursorBottomRightResize
|
||||
return pointer.CursorSouthEastResize
|
||||
case ActionResizeNorthEast:
|
||||
return pointer.CursorTopRightResize
|
||||
return pointer.CursorNorthEastResize
|
||||
case ActionResizeSouthWest:
|
||||
return pointer.CursorBottomLeftResize
|
||||
return pointer.CursorSouthWestResize
|
||||
case ActionResizeWest:
|
||||
return pointer.CursorLeftResize
|
||||
return pointer.CursorWestResize
|
||||
case ActionResizeEast:
|
||||
return pointer.CursorRightResize
|
||||
return pointer.CursorEastResize
|
||||
case ActionResizeNorth:
|
||||
return pointer.CursorTopResize
|
||||
return pointer.CursorNorthResize
|
||||
case ActionResizeSouth:
|
||||
return pointer.CursorBottomResize
|
||||
return pointer.CursorSouthResize
|
||||
}
|
||||
return pointer.CursorDefault
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user