Skip to content

text input selection radius#24307

Open
ickshonpe wants to merge 5 commits into
bevyengine:mainfrom
ickshonpe:selection-corner-rounding
Open

text input selection radius#24307
ickshonpe wants to merge 5 commits into
bevyengine:mainfrom
ickshonpe:selection-corner-rounding

Conversation

@ickshonpe
Copy link
Copy Markdown
Contributor

@ickshonpe ickshonpe commented May 15, 2026

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"
image

Showcase

rounded r2 r3

@ickshonpe ickshonpe added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets A-Text Rendering and layout for characters D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 15, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering May 15, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in UI May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen A-Text Rendering and layout for characters A-UI Graphical user interfaces, styles, layouts, and widgets C-Feature A new feature, making something new possible D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage
Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

Text Input selection rect corner radius support

1 participant