Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-widget text select #3870

Merged
merged 7 commits into from
Jan 24, 2024
Merged

Cross-widget text select #3870

merged 7 commits into from
Jan 24, 2024

Conversation

emilk
Copy link
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 marked this pull request as ready for review January 24, 2024 13:14
@emilk emilk merged commit 41aad74 into master Jan 24, 2024
33 checks passed
@emilk emilk deleted the emilk/multi-label-select branch January 24, 2024 14:45
@YgorSouza YgorSouza mentioned this pull request Feb 4, 2024
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