Commit ec048ab
Improve selection behaviour on focus change
On windows, we persist the existing selection when focus
changes. On mac, the behaviour depends on whether or not there
was a click. If there was a click, we use the click to determine
the selection; otherwise we select the whole buffer.
In addition, on mac, we no longer draw the cursor if the selection
is not a caret.
- fixes #1225 (again)
Update druid/src/widget/textbox.rs
Co-authored-by: Leopold Luley <git@leopoldluley.de>1 parent fae3d04 commit ec048ab
File tree
4 files changed
+32
-9
lines changed- druid/src
- text
- widget
4 files changed
+32
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
498 | 499 | | |
499 | 500 | | |
500 | 501 | | |
| 502 | + | |
501 | 503 | | |
502 | 504 | | |
503 | 505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 56 | | |
64 | 57 | | |
65 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| |||
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| 75 | + | |
69 | 76 | | |
70 | 77 | | |
71 | 78 | | |
| |||
196 | 203 | | |
197 | 204 | | |
198 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
199 | 217 | | |
200 | 218 | | |
201 | 219 | | |
| |||
209 | 227 | | |
210 | 228 | | |
211 | 229 | | |
| 230 | + | |
212 | 231 | | |
213 | 232 | | |
214 | 233 | | |
| |||
284 | 303 | | |
285 | 304 | | |
286 | 305 | | |
287 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
288 | 311 | | |
289 | 312 | | |
290 | 313 | | |
| |||
370 | 393 | | |
371 | 394 | | |
372 | 395 | | |
373 | | - | |
| 396 | + | |
374 | 397 | | |
375 | 398 | | |
376 | 399 | | |
| |||
0 commit comments