R3.3: the LOK view's pointer follows the kernel; an arrow over cells
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> [skip ci]
This commit is contained in:
1 parent
ee1b8ad375
commit
26c0a64665
11 files changed
+72
-6
No files matched your search
@@ -59,7 +59,7 @@ impl Render for LokView {
|
||||
.aria_value(self.a11y.text.clone())
|
||||
.key_context(CONTEXT)
|
||||
.track_focus(&self.focus)
|
||||
.cursor(CursorStyle::IBeam)
|
||||
.cursor(self.pointer)
|
||||
.size_full()
|
||||
.overflow_hidden()
|
||||
.bg(canvas_color)
|
||||
@@ -360,3 +360,29 @@ impl LokView {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The cursor for a kernel CSS pointer name.
|
||||
pub(super) fn pointer(css: &str) -> CursorStyle {
|
||||
match css {
|
||||
"default" | "wait" | "help" => CursorStyle::Arrow,
|
||||
"text" => CursorStyle::IBeam,
|
||||
"vertical-text" => CursorStyle::IBeamCursorForVerticalLayout,
|
||||
"crosshair" | "fill" => CursorStyle::Crosshair,
|
||||
"move" => CursorStyle::ClosedHand,
|
||||
"grab" => CursorStyle::OpenHand,
|
||||
"pointer" => CursorStyle::PointingHand,
|
||||
"n-resize" | "s-resize" => CursorStyle::ResizeUpDown,
|
||||
"e-resize" | "w-resize" => CursorStyle::ResizeLeftRight,
|
||||
"ne-resize" | "sw-resize" => CursorStyle::ResizeUpRightDownLeft,
|
||||
"nw-resize" | "se-resize" => CursorStyle::ResizeUpLeftDownRight,
|
||||
"col-resize" => CursorStyle::ResizeColumn,
|
||||
"row-resize" => CursorStyle::ResizeRow,
|
||||
"copy" => CursorStyle::DragCopy,
|
||||
"alias" => CursorStyle::DragLink,
|
||||
"not-allowed" => CursorStyle::OperationNotAllowed,
|
||||
_ => {
|
||||
log::warn!("lok: unknown pointer {css}");
|
||||
CursorStyle::Arrow
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user