text input selection radius (#24307)
# Objective Allow rounded corners for text input selection regions. Fixes #23952 ## Solution * Added a `selection_radius` field to `TextCursorStyle`, defaults to `0.`. * In `extract_text_cursor` set a corner radius for each selection rect, after clamping for short and inner corners. --- Left rounded inner corners for a follow up, as they are significantly more complicated to implement. ## Testing Added an option to set the selection radius to the `multiline_text_input` example: ``` cargo run --example multiline_text_input --features="system_clipboard" ``` <img width="400" alt="image" src="https://github.com/user-attachments/assets/a10bb552-ac03-4e06-a287-53c57e5c2f45" /> ## Showcase <img width="400" alt="rounded" src="https://github.com/user-attachments/assets/79d59c66-7fb0-4ad4-8a17-308c755c1f23" /> <img width="400" alt="r2" src="https://github.com/user-attachments/assets/a3dfd8a6-f85f-4534-ba61-4a8c74e9793d" /> <img width="400" alt="r3" src="https://github.com/user-attachments/assets/78e4d863-198e-4ee0-ad33-22e7cde7016a" />
I
ickshonpe committed
bf9a118c46b6e09db8fe25592500014718a6b421
Parent: c092324
Committed by GitHub <noreply@github.com>
on 5/21/2026, 8:24:38 AM