Skip to content

Cross-widget text select#3870

Merged
emilk merged 7 commits intomasterfrom
emilk/multi-label-select
Jan 24, 2024
Merged

Cross-widget text select#3870
emilk merged 7 commits intomasterfrom
emilk/multi-label-select

Conversation

@emilk
Copy link
Copy Markdown
Owner

@emilk emilk commented Jan 23, 2024

cross-widget-text-selection

Turn off with style.interaction.multi_widget_text_select.

There is an API for this in LabelSelectionState, but it's pretty bare-bones.

This became really hairy implementation-wise, but it works decently well.

Limitations

  • Drag-select to scroll doesn't work
  • A selection disappears if you scroll past one of its end-points
  • Only the text of labels and links are selectable

TODO

  • An option to turn it off
  • An API for querying about the selected text, and to deselect it.
  • Scrolling past selection behaves weird
  • Shift-click to select a range

@emilk emilk added text Problems related to text egui labels Jan 23, 2024
@emilk emilk force-pushed the emilk/multi-label-select branch 3 times, most recently from 8fba01f to ade70f1 Compare January 23, 2024 17:12
@emilk emilk force-pushed the emilk/multi-label-select branch from ade70f1 to 9f0b0ec Compare January 24, 2024 12:42
@emilk emilk force-pushed the emilk/multi-label-select branch from 9f0b0ec to bbd9335 Compare January 24, 2024 12:44
@emilk emilk marked this pull request as ready for review January 24, 2024 13:14
@emilk emilk force-pushed the emilk/multi-label-select branch from d110831 to a8a7996 Compare January 24, 2024 14:30
@emilk emilk merged commit 41aad74 into master Jan 24, 2024
@emilk emilk deleted the emilk/multi-label-select branch January 24, 2024 14:45
@YgorSouza YgorSouza mentioned this pull request Feb 4, 2024
@TicClick TicClick mentioned this pull request Feb 9, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

egui text Problems related to text

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Select text across widgets

1 participant