Expand description
TwistArrow — a small chevron that indicates and toggles a tree node’s expansion.
Renders a right-pointing arrow when collapsed and a down-pointing arrow when
expanded; a leaf node (where has_children is false) paints nothing but
reserves its slot so the indent column stays aligned across all rows.
The glyph flips direction under right-to-left layout.
Accessibility-decorative: the chevron hides itself from the AT tree and
the parent row’s node owns set_expanded.
// TwistArrow is typically instantiated by TreeView row delegates and requires
// an EventContext to wire the tap callback. The snippet below shows the
// construction pattern used inside a custom tree-row build().
let arrow = TwistArrow::new(16.0, true, false)
.on_click(|ctx| ctx.send_intent(teksilo_core::Intent::new("tree.toggle")));§Touch and pen
A 12 dp chevron is half the 24 dp target floor and cannot grow — the indent
column is the tree’s own geometry. It declares a Widget::hit_outset
instead, which is the one mechanism that can win here: the chevron’s
neighbour is the row, the row takes presses, and a point inside the row is
at distance zero from it, so the miss-only slop pass could never reach the
chevron. Zero for a leaf chevron and for a decorative one, which take no
press.
Structs§
- Twist
Arrow - Small interactive chevron rendered in the leading indent column of a tree row.