Commit b7ba605
Selection rect gap fix (#24306)
# Objective
Fix the gaps that sometimes occur between vertically adjacent text
selection rects:
<img width="486" height="448" alt="gap"
src="https://github.com/user-attachments/assets/b8e8d6b3-18fa-4731-9937-72544f1837be"
/>
Frequency of gaps varies depending on scale factor and font settings.
## Solution
Iterate the selection rects returned from Parley in pairs. If there is a
gap, close it by extending the bottom edge downwards.
<img width="489" height="460" alt="no-gaps"
src="https://github.com/user-attachments/assets/063b3b93-c6af-459b-a774-a345a22b95b7"
/>
## Testing
```
cargo run --example multiline_text_input --features="system_clipboard"
```1 parent b4b1268 commit b7ba605
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
449 | 458 | | |
450 | 459 | | |
451 | 460 | | |
| |||
0 commit comments