Repository navigation
Commit 7c8137e
committed
Say when a row was cut, instead of just stopping
Every row of the address list is an address that does not fit, cut at
whatever pixel ran out. A row that stops looks exactly like a row that
ended, so the reader has nothing telling them the value continues -
and on this list every value does.
Rows that do not fit now end in an ellipsis. It is paid for out of the
same width rather than drawn past it: the fit is recomputed against
what is left after reserving room for the dots, so a truncated row is
never wider than one that fits.
This is in the list renderer rather than at the address list, so any
row that overflows says so. In practice that is only this list -
labels_fit_a_row already holds every menu label to fitting - which is
why the change is narrow in effect while being general in the code.
The self-test checks both halves, because either alone passes while the
other is broken: that the dots stay inside the row's own column rather
than running under the scrollbar, and that they are drawn at all. The
second compares the rendered row against its own fit_row prefix - what
a silent cut would have produced - and requires them to differ.
Verified it fails when the ellipsis is removed.1 parent 7e72b6f commit 7c8137e
2 files changed
Lines changed: 83 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1620 | 1620 | | |
1621 | 1621 | | |
1622 | 1622 | | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
1623 | 1674 | | |
1624 | 1675 | | |
1625 | 1676 | | |
| |||
2284 | 2335 | | |
2285 | 2336 | | |
2286 | 2337 | | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
2287 | 2342 | | |
2288 | 2343 | | |
2289 | 2344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
466 | 492 | | |
467 | 493 | | |
468 | 494 | | |
| |||
807 | 833 | | |
808 | 834 | | |
809 | 835 | | |
810 | | - | |
811 | | - | |
| 836 | + | |
| 837 | + | |
812 | 838 | | |
813 | 839 | | |
814 | 840 | | |
| |||
0 commit comments