Commit f7a2173
committed
Fix ListControl scroll indicator logic and ScrollablePanel hit-test/scroll height
ListControl: only reserve a scroll-indicator row when items genuinely overflow the
viewport. Previously the -1 was applied unconditionally, causing a blank bottom row
for lists that fit entirely. Affects MeasureDOM (bounded Fill branch), PaintDOM
(availableContentHeight, item loop guards, fill-empty section), and
GetEffectiveVisibleItems in Navigation.
ScrollablePanelControl: pass _viewportHeight as MaxHeight to both MeasureChildHeight
and CalculateContentHeight (from PaintDOM). This ensures Fill-aligned children
measure to their true rendered height rather than the unbounded fallback of
Math.Min(10, count), fixing two bugs:
- GetClickTargetChild hit-test height now matches rendered height, so clicks on
rows beyond the default-10 no longer fall through to the "empty space" path
and lose focus.
- _contentHeight now reflects the actual rendered content, so the panel can scroll
the full range when fixed-height siblings push total content past the viewport.1 parent ce07864 commit f7a2173
3 files changed
Lines changed: 86 additions & 38 deletions
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
Lines changed: 34 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
207 | 215 | | |
208 | | - | |
209 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
210 | 220 | | |
211 | | - | |
212 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
213 | 228 | | |
214 | | - | |
| 229 | + | |
215 | 230 | | |
216 | | - | |
217 | 231 | | |
218 | 232 | | |
219 | 233 | | |
| |||
326 | 340 | | |
327 | 341 | | |
328 | 342 | | |
329 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
330 | 350 | | |
331 | 351 | | |
332 | 352 | | |
| |||
355 | 375 | | |
356 | 376 | | |
357 | 377 | | |
358 | | - | |
| 378 | + | |
359 | 379 | | |
360 | 380 | | |
361 | 381 | | |
362 | 382 | | |
363 | 383 | | |
364 | 384 | | |
365 | | - | |
| 385 | + | |
366 | 386 | | |
367 | 387 | | |
368 | 388 | | |
| |||
472 | 492 | | |
473 | 493 | | |
474 | 494 | | |
475 | | - | |
| 495 | + | |
476 | 496 | | |
477 | 497 | | |
478 | 498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
734 | 734 | | |
735 | 735 | | |
736 | 736 | | |
737 | | - | |
| 737 | + | |
| 738 | + | |
738 | 739 | | |
739 | | - | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
740 | 744 | | |
741 | | - | |
742 | | - | |
743 | | - | |
| 745 | + | |
| 746 | + | |
744 | 747 | | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
751 | 751 | | |
752 | | - | |
753 | | - | |
754 | | - | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
755 | 770 | | |
756 | | - | |
757 | 771 | | |
758 | 772 | | |
759 | 773 | | |
| |||
880 | 894 | | |
881 | 895 | | |
882 | 896 | | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
883 | 901 | | |
884 | 902 | | |
885 | 903 | | |
| |||
941 | 959 | | |
942 | 960 | | |
943 | 961 | | |
944 | | - | |
| 962 | + | |
| 963 | + | |
945 | 964 | | |
946 | 965 | | |
947 | 966 | | |
| |||
1292 | 1311 | | |
1293 | 1312 | | |
1294 | 1313 | | |
1295 | | - | |
| 1314 | + | |
1296 | 1315 | | |
1297 | 1316 | | |
1298 | 1317 | | |
| |||
1329 | 1348 | | |
1330 | 1349 | | |
1331 | 1350 | | |
1332 | | - | |
1333 | | - | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
1334 | 1356 | | |
1335 | 1357 | | |
1336 | 1358 | | |
| |||
1453 | 1475 | | |
1454 | 1476 | | |
1455 | 1477 | | |
1456 | | - | |
| 1478 | + | |
1457 | 1479 | | |
1458 | 1480 | | |
| 1481 | + | |
1459 | 1482 | | |
1460 | 1483 | | |
1461 | 1484 | | |
| |||
1469 | 1492 | | |
1470 | 1493 | | |
1471 | 1494 | | |
1472 | | - | |
| 1495 | + | |
1473 | 1496 | | |
1474 | 1497 | | |
1475 | 1498 | | |
| |||
0 commit comments