You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Selectable text: render text nodes through egui Labels from the measured galley #39
Raised by the user: text in chat_shell can't be selected, although egui labels are selectable by default.
Cause
bullseye's text primitive measures a galley during layout and paints it directly (painter.galley(..)). It never creates an egui Label, so egui's LabelSelectionState never sees it: no selection, no copy.
Proposal
For selectable text nodes, draw an egui Label built from the measured galley (WidgetText::Galley(Arc<Galley>)) at exactly the node's content rect, inside the node's Ui. Layout stays bullseye's, the text is measured once, and egui handles selection (including across several labels in the same layer) and Ctrl+C.
Default rule, as in CSS:
text is selectable;
text inside a node that senses clicks or drags is not, so buttons and clickable rows keep their clicks;
Tailwind-style overrides select_text() and select_none().
Library-drawn controls (owned buttons, checkbox labels, M4c) are select_none by default.
Selection colours come from the style (M4c contract): selection background and selected text colour.
Tests (kittest)
Dragging across a paragraph selects it, and Ctrl+C copies the text.
A drag across two adjacent paragraphs selects across both.
Clicking text inside a clickable row still activates the row and selects nothing.
select_none text can't be selected.
Layout is identical with and without selection.
The cost per text node in a long list goes into the M8 benchmark.
Where
Proposed for v0.1, in M4c alongside the owned widgets (it shares the "what senses" rules), or right after it. The user decides.
Activity
samitbasu commentedon Nov 8, 2026
Decided by the user: in v0.1, landing in M4c-1 (see #19).
Selectable text through egui's label selection (#39)