1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// SPDX-License-Identifier: MPL-2.0
// SPDX-FileCopyrightText: 2026 FernTech
//! Tier-3 style protocol for `ListView` and `TreeView` container
//! chrome (shared trait — both widgets paint the same kind of insertion
//! line). See `docs/styling-system.md`.
//!
//! Both widgets' rows are already themed via `StandardItemStyle`. The
//! only container-level chrome is the drag-insertion line and the
//! optional selection-band painted behind rows (today the selection
//! band is also a paint pass). This trait gives a place to install a
//! custom insertion indicator — the default uses the accent role.
//!
//! ## Two drop affordances, deliberately unalike
//!
//! A tree answers two different questions during a drag — "between which
//! two siblings?" ([`ListInsertionRecipe`], a line) and "inside which
//! container?" ([`ListDropIntoRecipe`], a box round the target row). They
//! must not be mistakable for one another, which is why the box is
//! **inset**: painted flush to the row it would share its top edge with a
//! `Before` line and its bottom edge with an `After` line, and the drag
//! ghost hides the vertical sides that would have told them apart — so the
//! only thing a writer reads is "an accent bar at a row boundary",
//! identical in all three cases. The inset is the whole point of the
//! recipe; a theme lowering it to zero re-creates the ambiguity.
//!
//! ## Wiring status
//!
//! The trait + `style_slots.list_container` slot are in place; the
//! `ListInsertionRecipe` carries the role + thickness data consumed
//! by `ListView::paint` / `TreeView::paint`. Replacing the inline
//! paint with a composed `RectWidget` leaf (analogous to the `TabBar`
//! drop-indicator pattern) is deferred. The slot's data is already
//! read by both widgets' paint passes (no more hard-coded
//! `Color::from_rgba(0.2, 0.4, 0.9, 0.8)`).
use Rc;
use BorderRole;
use crateBuildContext;
use crateWidgetId;
/// Configuration for `make_insertion_indicator`.
/// Recipe — non-widget data describing the inline paint of the
/// insertion line. `ListView::paint` / `TreeView::paint` resolve the
/// `role` against the active theme each frame.
/// Recipe — non-widget data describing the inline paint of the
/// "drop **into** this container" highlight, the reparent counterpart of
/// [`ListInsertionRecipe`]. Resolved against the active theme each frame by
/// `TreeView::paint` / `TreeTableView::paint`.
pub type SharedListContainerStyle = ;