edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiB7f487c1Tahinli3 months ago659 commits
| 1 | //! What is drawn and where: the toolbar, the theme, the notices, the lanes |
| 2 | //! and their marks, the tints, the subtitle rows and the sliders. |
| 3 | |
| 4 | use *; |
| 5 | |
| 6 | /// The edit toolbar against the 640x360 floor the whole editor is measured |
| 7 | /// at. It does not fit and cannot be made to -- so what it may never do is |
| 8 | /// *hide* the tail: the row scrolls, and the door to everything scrolled |
| 9 | /// off it is pinned outside the scrolling box. |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | /// The whole reason `ui/theme.rs` exists: a colour written anywhere else is |
| 48 | /// a colour the next palette sweep will miss, which is exactly how 186 grey |
| 49 | /// calls survived every previous attempt at this. |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | /// The literal-grep above is blind to a hue arriving through a theme |
| 61 | /// *constant*: `DARK_SEAM` carried `rgba(0,0,0,.7)` (`0xRRGGBBAA`) into |
| 62 | /// `rgb()`, which reads the alpha byte as blue -- 2436 blue pixels in a |
| 63 | /// darkroom screenshot, on a call site that never once wrote `0x` itself. |
| 64 | /// So this scan reads the theme's own encoding: every constant whose low |
| 65 | /// byte is not `ff` (i.e. `0xRRGGBBAA` with a real alpha) is alpha-carrying, |
| 66 | /// and an alpha-carrying role may only ever be handed to `rgba(`, never |
| 67 | /// `rgb(`. |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | /// "It scrolls" is not "it can be found": at the 640x360 floor the timeline |
| 95 | /// takes its share and no more, so a third track is behind a scroll -- and |
| 96 | /// the line that says so has to keep telling the truth *while* the column is |
| 97 | /// being scrolled, or it is an instruction nobody can carry out. |
| 98 | |
| 99 | |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | |
| 138 | |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | /// The failure a user never learns about is the one that was answered by |
| 145 | /// another failure: two imports failing back to back are two messages, in |
| 146 | /// the order they happened, and the second does not overwrite the first |
| 147 | /// before a frame has drawn it. |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | /// An export's own outcome is what a person started it to read, so it must |
| 175 | /// never sit behind two progress lines queued while it ran: it jumps to the |
| 176 | /// front and is the one showing the moment it arrives. |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | |
| 197 | |
| 198 | |
| 199 | |
| 200 | /// The bar colours itself off the words the message already opens with, so |
| 201 | /// the tone cannot disagree with the sentence it labels. |
| 202 | |
| 203 | |
| 204 | |
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | /// The cards are sections of the inspector, not sheets over the timeline: |
| 211 | /// adjusting a clip must never hide the clip. Structural, because that is |
| 212 | /// where the rule lives -- a card rendered from the root again would be an |
| 213 | /// overlay again, whatever it looked like on the day it was written. |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | |
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | |
| 238 | |
| 239 | |
| 240 | |
| 241 | |
| 242 | /// MUST 1, on the two named offenders: the button that relabels itself |
| 243 | /// mid-export and the one that used to read "Muted 80%". Both live in a |
| 244 | /// rect that is reserved once, so the words change and the box does not. |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | |
| 262 | |
| 263 | |
| 264 | |
| 265 | |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | |
| 274 | |
| 275 | |
| 276 | |
| 277 | |
| 278 | |
| 279 | |
| 280 | |
| 281 | |
| 282 | |
| 283 | |
| 284 | |
| 285 | |
| 286 | |
| 287 | |
| 288 | |
| 289 | |
| 290 | |
| 291 | |
| 292 | |
| 293 | |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | |
| 299 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | |
| 307 | |
| 308 | |
| 309 | |
| 310 | |
| 311 | |
| 312 | |
| 313 | |
| 314 | |
| 315 | |
| 316 | |
| 317 | |
| 318 | |
| 319 | |
| 320 | |
| 321 | |
| 322 | |
| 323 | |
| 324 | |
| 325 | |
| 326 | |
| 327 | |
| 328 | |
| 329 | |
| 330 | |
| 331 | |
| 332 | |
| 333 | |
| 334 | |
| 335 | |
| 336 | |
| 337 | |
| 338 | |
| 339 | |
| 340 | |
| 341 | |
| 342 | |
| 343 | |
| 344 | /// The scrollbar's thumb: the visible share of the timeline at its own |
| 345 | /// place on the track, full width with nothing to scroll, never narrower than |
| 346 | /// a hand can hold, and never off the ends. |
| 347 | |
| 348 | |
| 349 | |
| 350 | |
| 351 | |
| 352 | |
| 353 | |
| 354 | |
| 355 | |
| 356 | |
| 357 | |
| 358 | |
| 359 | |
| 360 | |
| 361 | |
| 362 | |
| 363 | |
| 364 | |
| 365 | |
| 366 | |
| 367 | /// A press beside the time axis's thumb jumps so the thumb's middle is under |
| 368 | /// the pointer, and the drag that carries on from the press must land exactly |
| 369 | /// where the jump left the view: both are read through the track's own |
| 370 | /// proportion (a jump worked out in pixels at the view's pps used to land at |
| 371 | /// span-over-duration of the target, and the snap on the first move was the |
| 372 | /// drag correcting it). The equality below is the no-snap invariant, at the |
| 373 | /// thumb's own width and at its floor width alike. |
| 374 | |
| 375 | |
| 376 | |
| 377 | |
| 378 | |
| 379 | |
| 380 | |
| 381 | |
| 382 | |
| 383 | |
| 384 | |
| 385 | |
| 386 | |
| 387 | |
| 388 | |
| 389 | |
| 390 | |
| 391 | |
| 392 | |
| 393 | |
| 394 | |
| 395 | |
| 396 | |
| 397 | |
| 398 | |
| 399 | |
| 400 | |
| 401 | |
| 402 | /// The strip's row is furniture only while there is somewhere to scroll to: |
| 403 | /// zoomed out to the whole timeline the strip is not drawn and neither is its |
| 404 | /// height -- out of every budget at once (the region, the box the lanes are |
| 405 | /// laid out against, and the seam's floor), or the lanes would gain or lose a |
| 406 | /// strip's row at the zoom boundary without the strip to show for it. |
| 407 | |
| 408 | |
| 409 | |
| 410 | |
| 411 | |
| 412 | |
| 413 | |
| 414 | |
| 415 | |
| 416 | |
| 417 | |
| 418 | |
| 419 | |
| 420 | |
| 421 | |
| 422 | |
| 423 | |
| 424 | |
| 425 | |
| 426 | |
| 427 | |
| 428 | |
| 429 | |
| 430 | |
| 431 | |
| 432 | |
| 433 | |
| 434 | |
| 435 | |
| 436 | |
| 437 | |
| 438 | |
| 439 | |
| 440 | |
| 441 | |
| 442 | |
| 443 | |
| 444 | |
| 445 | |
| 446 | |
| 447 | |
| 448 | |
| 449 | |
| 450 | |
| 451 | |
| 452 | |
| 453 | |
| 454 | |
| 455 | |
| 456 | |
| 457 | |
| 458 | /// The lane stack's thumb: the visible share of the rows at their own place |
| 459 | /// on the track, the time axis's own thumb turned through a right angle. |
| 460 | |
| 461 | |
| 462 | |
| 463 | |
| 464 | |
| 465 | |
| 466 | |
| 467 | |
| 468 | |
| 469 | |
| 470 | |
| 471 | |
| 472 | |
| 473 | |
| 474 | |
| 475 | |
| 476 | |
| 477 | |
| 478 | |
| 479 | |
| 480 | |
| 481 | /// A caption's box wears the rate its window plays at, derived off the |
| 482 | /// placement itself: unity placements -- including odd widths whose frames |
| 483 | /// came off `frames_of_us` rounding -- do not badge, and a re-rate does, with |
| 484 | /// the rate surviving the group coming apart. |
| 485 | |
| 486 | |
| 487 | |
| 488 | |
| 489 | |
| 490 | |
| 491 | |
| 492 | |
| 493 | |
| 494 | |
| 495 | |
| 496 | |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | |
| 504 | |
| 505 | |
| 506 | |
| 507 | |
| 508 | |
| 509 | |
| 510 | |
| 511 | |
| 512 | |
| 513 | |
| 514 | |
| 515 | |
| 516 | |
| 517 | |
| 518 | |
| 519 | |
| 520 | |
| 521 | |
| 522 | |
| 523 | |
| 524 | |
| 525 | |
| 526 | |
| 527 | |
| 528 | |
| 529 | |
| 530 | |
| 531 | |
| 532 | /// The selection itself: clicks in order, the anchor under the hand, the |
| 533 | /// toggle that assembles a group, and the plain click that replaces it all. |
| 534 | |
| 535 | |
| 536 | |
| 537 | |
| 538 | |
| 539 | |
| 540 | |
| 541 | |
| 542 | |
| 543 | |
| 544 | |
| 545 | |
| 546 | |
| 547 | |
| 548 | |
| 549 | |
| 550 | |
| 551 | |
| 552 | |
| 553 | |
| 554 | |
| 555 | |
| 556 | |
| 557 | |
| 558 | |
| 559 | |
| 560 | |
| 561 | |
| 562 | |
| 563 | |
| 564 | |
| 565 | |
| 566 | |
| 567 | |
| 568 | |
| 569 | |
| 570 | |
| 571 | |
| 572 | |
| 573 | |
| 574 | |
| 575 | |
| 576 | |
| 577 | |
| 578 | |
| 579 | |
| 580 | |
| 581 | |
| 582 | |
| 583 | |
| 584 | |
| 585 | |
| 586 | |
| 587 | |
| 588 | |
| 589 | |
| 590 | |
| 591 | |
| 592 | |
| 593 | |
| 594 | |
| 595 | |
| 596 | |
| 597 | |
| 598 | |
| 599 | |
| 600 | |
| 601 | |
| 602 | |
| 603 | |
| 604 | |
| 605 | |
| 606 | |
| 607 | |
| 608 | |
| 609 | |
| 610 | |
| 611 | |
| 612 | |
| 613 | |
| 614 | |
| 615 | |
| 616 | |
| 617 | |
| 618 | |
| 619 | |
| 620 | |
| 621 | |
| 622 | |
| 623 | |
| 624 | |
| 625 | |
| 626 | |
| 627 | |
| 628 | |
| 629 | |
| 630 | |
| 631 | |
| 632 | |
| 633 | |
| 634 | |
| 635 | |
| 636 | |
| 637 | |
| 638 | |
| 639 | |
| 640 | |
| 641 | |
| 642 | |
| 643 | |
| 644 | |
| 645 | |
| 646 | |
| 647 | |
| 648 | |
| 649 | |
| 650 | /// A box laid out wider than any screen -- a long clip at a deep zoom -- is |
| 651 | /// still one screen's worth of columns: the path a repaint has to build is |
| 652 | /// bounded by what can be seen, not by what the layout says the box is. |
| 653 | /// Unbounded, a 5 s clip zoomed to the frame is a path of millions of points |
| 654 | /// per frame, and the repaint that stalls on it is the waveform that |
| 655 | /// "disappeared". |
| 656 | |
| 657 | |
| 658 | |
| 659 | |
| 660 | |
| 661 | |
| 662 | |
| 663 | |
| 664 | |
| 665 | |
| 666 | |
| 667 | |
| 668 | |
| 669 | |
| 670 | |
| 671 | |
| 672 | |
| 673 | |
| 674 | |
| 675 | |
| 676 | |
| 677 | |
| 678 | |
| 679 | |
| 680 | |
| 681 | |
| 682 | |
| 683 | /// The box a trim draws is the box its release commits, at every speed. The |
| 684 | /// preview used to hand the *timeline* frame count to a source-frame field: |
| 685 | /// at 2x a tail moved twice as fast as the pointer and snapped back on |
| 686 | /// release, and a head drag moved the clip's other edge. |
| 687 | |
| 688 | |
| 689 | |
| 690 | |
| 691 | |
| 692 | |
| 693 | |
| 694 | |
| 695 | |
| 696 | |
| 697 | |
| 698 | |
| 699 | |
| 700 | |
| 701 | |
| 702 | |
| 703 | |
| 704 | |
| 705 | |
| 706 | |
| 707 | |
| 708 | |
| 709 | |
| 710 | |
| 711 | |
| 712 | |
| 713 | |
| 714 | |
| 715 | |
| 716 | |
| 717 | |
| 718 | |
| 719 | |
| 720 | |
| 721 | |
| 722 | |
| 723 | |
| 724 | |
| 725 | |
| 726 | /// The caption a drag is showing lands where the release commits -- the |
| 727 | /// subtitle twin of the trim preview above -- and the two contracts the boxes |
| 728 | /// on the lanes rest on: `place_sub`'s `at` wins over the placement's own |
| 729 | /// `start`, and a gesture that changed nothing is `Ok` and not a refusal, so a |
| 730 | /// front-end that toasted every `Ok` would toast a pick-up-put-back. |
| 731 | |
| 732 | |
| 733 | |
| 734 | |
| 735 | |
| 736 | |
| 737 | |
| 738 | |
| 739 | |
| 740 | |
| 741 | |
| 742 | |
| 743 | |
| 744 | |
| 745 | |
| 746 | |
| 747 | |
| 748 | |
| 749 | |
| 750 | |
| 751 | |
| 752 | |
| 753 | |
| 754 | |
| 755 | |
| 756 | |
| 757 | |
| 758 | |
| 759 | |
| 760 | |
| 761 | |
| 762 | |
| 763 | |
| 764 | |
| 765 | |
| 766 | |
| 767 | |
| 768 | |
| 769 | |
| 770 | |
| 771 | |
| 772 | |
| 773 | |
| 774 | |
| 775 | |
| 776 | |
| 777 | |
| 778 | |
| 779 | |
| 780 | |
| 781 | |
| 782 | |
| 783 | |
| 784 | |
| 785 | |
| 786 | |
| 787 | |
| 788 | |
| 789 | |
| 790 | |
| 791 | |
| 792 | |
| 793 | |
| 794 | |
| 795 | |
| 796 | |
| 797 | |
| 798 | |
| 799 | |
| 800 | |
| 801 | |
| 802 | |
| 803 | /// A still trims the same way, and the preview knows it: its head grows |
| 804 | /// forward from source frame 0 -- every frame of it is the same picture -- |
| 805 | /// so the box stretches instead of sliding left. |
| 806 | |
| 807 | |
| 808 | |
| 809 | |
| 810 | |
| 811 | |
| 812 | |
| 813 | |
| 814 | |
| 815 | |
| 816 | |
| 817 | |
| 818 | |
| 819 | |
| 820 | |
| 821 | |
| 822 | |
| 823 | |
| 824 | |
| 825 | |
| 826 | |
| 827 | |
| 828 | |
| 829 | |
| 830 | |
| 831 | |
| 832 | /// gpui freezes a drag's payload for the whole gesture, and nothing stops a |
| 833 | /// stroke from editing the lane under it: the drop has to find the clip that |
| 834 | /// was picked up, not whatever slid into its index. |
| 835 | |
| 836 | |
| 837 | |
| 838 | |
| 839 | |
| 840 | |
| 841 | |
| 842 | |
| 843 | |
| 844 | |
| 845 | |
| 846 | |
| 847 | |
| 848 | |
| 849 | |
| 850 | |
| 851 | |
| 852 | |
| 853 | |
| 854 | |
| 855 | |
| 856 | |
| 857 | |
| 858 | |
| 859 | |
| 860 | |
| 861 | |
| 862 | |
| 863 | |
| 864 | |
| 865 | |
| 866 | |
| 867 | |
| 868 | |
| 869 | |
| 870 | |
| 871 | |
| 872 | |
| 873 | |
| 874 | |
| 875 | |
| 876 | |
| 877 | |
| 878 | |
| 879 | /// The whole waveform path, from the file on disk to the columns that get |
| 880 | /// painted: what no screenshot can assert about the shape. |
| 881 | |
| 882 | |
| 883 | |
| 884 | |
| 885 | |
| 886 | |
| 887 | |
| 888 | |
| 889 | |
| 890 | |
| 891 | |
| 892 | |
| 893 | |
| 894 | |
| 895 | |
| 896 | |
| 897 | |
| 898 | |
| 899 | |
| 900 | |
| 901 | |
| 902 | |
| 903 | |
| 904 | |
| 905 | |
| 906 | |
| 907 | |
| 908 | |
| 909 | |
| 910 | |
| 911 | |
| 912 | |
| 913 | |
| 914 | |
| 915 | |
| 916 | |
| 917 | |
| 918 | |
| 919 | |
| 920 | |
| 921 | |
| 922 | |
| 923 | |
| 924 | |
| 925 | |
| 926 | |
| 927 | |
| 928 | |
| 929 | |
| 930 | |
| 931 | |
| 932 | |
| 933 | |
| 934 | |
| 935 | |
| 936 | |
| 937 | |
| 938 | |
| 939 | |
| 940 | |
| 941 | |
| 942 | |
| 943 | |
| 944 | |
| 945 | |
| 946 | |
| 947 | |
| 948 | |
| 949 | |
| 950 | |
| 951 | |
| 952 | |
| 953 | |
| 954 | |
| 955 | |
| 956 | |
| 957 | |
| 958 | |
| 959 | |
| 960 | |
| 961 | |
| 962 | |
| 963 | |
| 964 | |
| 965 | |
| 966 | |
| 967 | |
| 968 | |
| 969 | |
| 970 | |
| 971 | |
| 972 | |
| 973 | |
| 974 | |
| 975 | |
| 976 | |
| 977 | |
| 978 | |
| 979 | /// Not "they are different numbers" -- different *enough to see*, against |
| 980 | /// each other and against the surface a swatch is drawn on. The palette is |
| 981 | /// deliberately dark and low-saturation, so the margin is thin and a new |
| 982 | /// tint picked by eye can land inside it without anyone noticing. |
| 983 | |
| 984 | |
| 985 | |
| 986 | |
| 987 | |
| 988 | |
| 989 | |
| 990 | |
| 991 | |
| 992 | |
| 993 | |
| 994 | |
| 995 | |
| 996 | |
| 997 | |
| 998 | |
| 999 | |
| 1000 | |
| 1001 | |
| 1002 | |
| 1003 | |
| 1004 | |
| 1005 | |
| 1006 | |
| 1007 | |
| 1008 | |
| 1009 | |
| 1010 | |
| 1011 | |
| 1012 | |
| 1013 | |
| 1014 | |
| 1015 | |
| 1016 | |
| 1017 | |
| 1018 | |
| 1019 | |
| 1020 | |
| 1021 | |
| 1022 | |
| 1023 | |
| 1024 | |
| 1025 | |
| 1026 | |
| 1027 | |
| 1028 | |
| 1029 | |
| 1030 | |
| 1031 | |
| 1032 | |
| 1033 | |
| 1034 | |
| 1035 | |
| 1036 | |
| 1037 | |
| 1038 | |
| 1039 | |
| 1040 | |
| 1041 | |
| 1042 | |
| 1043 | /// A `.srt` dropped on the window is nobody's stream: it has no source |
| 1044 | /// entry, and the lookup that used to fall back to index 0 painted it with |
| 1045 | /// the first file's colour -- a swatch saying it came out of a film it |
| 1046 | /// never touched. |
| 1047 | |
| 1048 | |
| 1049 | |
| 1050 | |
| 1051 | |
| 1052 | |
| 1053 | |
| 1054 | |
| 1055 | |
| 1056 | |
| 1057 | |
| 1058 | |
| 1059 | |
| 1060 | |
| 1061 | |
| 1062 | |
| 1063 | |
| 1064 | |
| 1065 | |
| 1066 | |
| 1067 | |
| 1068 | |
| 1069 | |
| 1070 | |
| 1071 | |
| 1072 | |
| 1073 | |
| 1074 | |
| 1075 | |
| 1076 | |
| 1077 | |
| 1078 | |
| 1079 | |
| 1080 | |
| 1081 | |
| 1082 | |
| 1083 | |
| 1084 | |
| 1085 | |
| 1086 | |
| 1087 | |
| 1088 | |
| 1089 | /// A film's two ASS tracks with the timeline trimmed to twenty seconds: |
| 1090 | /// one of them still has cues there and one has none, and the card said |
| 1091 | /// nothing whatever about the second while the Subtitles list went on |
| 1092 | /// showing it with its eighty-three cues. |
| 1093 | /// |
| 1094 | /// And the 25 GB remux's thirty-five: naming those wrapped the row to ten |
| 1095 | /// lines and pushed Destination under the fold, so past the value box's |
| 1096 | /// three lines the same line counts instead. |
| 1097 | |
| 1098 | |
| 1099 | |
| 1100 | |
| 1101 | |
| 1102 | |
| 1103 | |
| 1104 | |
| 1105 | |
| 1106 | |
| 1107 | |
| 1108 | |
| 1109 | |
| 1110 | |
| 1111 | |
| 1112 | |
| 1113 | |
| 1114 | |
| 1115 | |
| 1116 | |
| 1117 | |
| 1118 | |
| 1119 | |
| 1120 | |
| 1121 | |
| 1122 | |
| 1123 | |
| 1124 | |
| 1125 | |
| 1126 | |
| 1127 | |
| 1128 | |
| 1129 | |
| 1130 | |
| 1131 | |
| 1132 | |
| 1133 | |
| 1134 | |
| 1135 | |
| 1136 | |
| 1137 | |
| 1138 | |
| 1139 | |
| 1140 | |
| 1141 | |
| 1142 | |
| 1143 | |
| 1144 | |
| 1145 | |
| 1146 | |
| 1147 | |
| 1148 | |
| 1149 | |
| 1150 | |
| 1151 | |
| 1152 | /// The list is in the order tracks were added, which is not the order a |
| 1153 | /// person reads it in: importing a second film puts its tracks after the |
| 1154 | /// first film's, and importing a third `.srt` for the first film puts that |
| 1155 | /// one last of all. The rows still read as three sources. |
| 1156 | |
| 1157 | |
| 1158 | |
| 1159 | |
| 1160 | |
| 1161 | |
| 1162 | |
| 1163 | |
| 1164 | |
| 1165 | |
| 1166 | |
| 1167 | |
| 1168 | |
| 1169 | |
| 1170 | |
| 1171 | |
| 1172 | |
| 1173 | |
| 1174 | |
| 1175 | |
| 1176 | |
| 1177 | |
| 1178 | |
| 1179 | |
| 1180 | |
| 1181 | |
| 1182 | |
| 1183 | |
| 1184 | |
| 1185 | |
| 1186 | |
| 1187 | |
| 1188 | |
| 1189 | |
| 1190 | |
| 1191 | |
| 1192 | |
| 1193 | |
| 1194 | |
| 1195 | |
| 1196 | |
| 1197 | |
| 1198 | |
| 1199 | |
| 1200 | |
| 1201 | |
| 1202 | |
| 1203 | |
| 1204 | |
| 1205 | |
| 1206 | |
| 1207 | |
| 1208 | |
| 1209 | |
| 1210 | |
| 1211 | |
| 1212 | |
| 1213 | |
| 1214 | /// The fold a click on a header sets is keyed by [`SubGroup::path`] |
| 1215 | /// (`Player::sub_folded`), so it has to survive the very thing regrouping |
| 1216 | /// is for: a second track landing on a file already in the list, or one |
| 1217 | /// being removed from it. The group's path is the fold's whole identity, |
| 1218 | /// so it must not move under either. |
| 1219 | |
| 1220 | |
| 1221 | |
| 1222 | |
| 1223 | |
| 1224 | |
| 1225 | |
| 1226 | |
| 1227 | |
| 1228 | |
| 1229 | |
| 1230 | |
| 1231 | |
| 1232 | |
| 1233 | |
| 1234 | |
| 1235 | |
| 1236 | |
| 1237 | |
| 1238 | |
| 1239 | |
| 1240 | |
| 1241 | |
| 1242 | /// What the strip header, the section heading and the toggle's notice all |
| 1243 | /// say. Two films each carrying an "eng" track are one word apart until the |
| 1244 | /// film is in the name; a film carrying two is one word apart from itself. |
| 1245 | |
| 1246 | |
| 1247 | |
| 1248 | |
| 1249 | |
| 1250 | |
| 1251 | |
| 1252 | |
| 1253 | |
| 1254 | |
| 1255 | |
| 1256 | |
| 1257 | |
| 1258 | |
| 1259 | |
| 1260 | |
| 1261 | |
| 1262 | |
| 1263 | |
| 1264 | |
| 1265 | |
| 1266 | |
| 1267 | |
| 1268 | |
| 1269 | |
| 1270 | |
| 1271 | |
| 1272 | |
| 1273 | |
| 1274 | |
| 1275 | /// What the toggle covers is what is *placed*, so what it says is a lane fact: |
| 1276 | /// naming the palette row the list happens to mark named a track the stroke |
| 1277 | /// never touched ("SUBTITLES OFF — one.srt is still on the timeline" for a |
| 1278 | /// one.srt nobody dragged anywhere). |
| 1279 | |
| 1280 | |
| 1281 | |
| 1282 | |
| 1283 | |
| 1284 | |
| 1285 | |
| 1286 | |
| 1287 | |
| 1288 | |
| 1289 | |
| 1290 | |
| 1291 | |
| 1292 | |
| 1293 | |
| 1294 | |
| 1295 | |
| 1296 | |
| 1297 | /// The door this editor answers "don't make me import the film again" with, |
| 1298 | /// and it is in the panel where the tracks it adds are listed: the Text |
| 1299 | /// tab's own button reads a file's subtitle tracks onto the open timeline |
| 1300 | /// -- a release's `.mkv`, an `.srt` beside it -- while the file itself |
| 1301 | /// joins nothing. It is the *action* and not a second implementation of it, |
| 1302 | /// so the button, the stroke and the actions card cannot drift apart, and |
| 1303 | /// it is oracle-gated like every other action button, so with no timeline |
| 1304 | /// open it dims and says why instead of opening a chooser for nothing. |
| 1305 | |
| 1306 | |
| 1307 | |
| 1308 | |
| 1309 | |
| 1310 | |
| 1311 | |
| 1312 | |
| 1313 | |
| 1314 | |
| 1315 | |
| 1316 | |
| 1317 | |
| 1318 | |
| 1319 | |
| 1320 | |
| 1321 | |
| 1322 | |
| 1323 | |
| 1324 | |
| 1325 | |
| 1326 | |
| 1327 | |
| 1328 | |
| 1329 | |
| 1330 | |
| 1331 | |
| 1332 | |
| 1333 | |
| 1334 | |
| 1335 | /// A source's group header in the library must not vanish on a short |
| 1336 | /// window: it is drawn whenever there is more than one source |
| 1337 | /// (`several_files`), never gated on the viewport's height, and the list |
| 1338 | /// under it is what scrolls instead ([`SUB_ROWS_H`]). And it has to be a |
| 1339 | /// real fold, not the click-cycling pattern this codebase has already |
| 1340 | /// thrown out once: one click toggles `sub_folded` shut or open, it never |
| 1341 | /// steps through more than those two states. |
| 1342 | |
| 1343 | |
| 1344 | |
| 1345 | |
| 1346 | |
| 1347 | |
| 1348 | |
| 1349 | |
| 1350 | |
| 1351 | |
| 1352 | |
| 1353 | |
| 1354 | |
| 1355 | |
| 1356 | |
| 1357 | |
| 1358 | |
| 1359 | |
| 1360 | |
| 1361 | |
| 1362 | |
| 1363 | |
| 1364 | |
| 1365 | |
| 1366 | |
| 1367 | |
| 1368 | |
| 1369 | |
| 1370 | |
| 1371 | /// The one thing regrouping must not break: `sub_track` is a flat index |
| 1372 | /// into the add-order list, a click sets it and a save writes it into the |
| 1373 | /// `.edith`. Every row must still name the track it was made from -- rows |
| 1374 | /// for refused tracks included, because they take a number in that list |
| 1375 | /// whether or not anyone can pick them. |
| 1376 | |
| 1377 | |
| 1378 | |
| 1379 | |
| 1380 | |
| 1381 | |
| 1382 | |
| 1383 | |
| 1384 | |
| 1385 | |
| 1386 | |
| 1387 | |
| 1388 | |
| 1389 | |
| 1390 | |
| 1391 | |
| 1392 | |
| 1393 | |
| 1394 | |
| 1395 | |
| 1396 | |
| 1397 | |
| 1398 | |
| 1399 | |
| 1400 | |
| 1401 | |
| 1402 | |
| 1403 | |
| 1404 | |
| 1405 | |
| 1406 | |
| 1407 | |
| 1408 | |
| 1409 | |
| 1410 | /// The × on a row shifts every track after it down one, and the pick is |
| 1411 | /// what an export writes into the file -- so a pick that stayed put would |
| 1412 | /// silently change which track the next export carries. Every relation |
| 1413 | /// between the pick and the row that went, on a list of three. |
| 1414 | |
| 1415 | |
| 1416 | |
| 1417 | |
| 1418 | |
| 1419 | |
| 1420 | |
| 1421 | |
| 1422 | |
| 1423 | |
| 1424 | |
| 1425 | |
| 1426 | |
| 1427 | |
| 1428 | |
| 1429 | |
| 1430 | |
| 1431 | |
| 1432 | /// The same claim from the click's end, on the order imports actually |
| 1433 | /// arrive in: two films opened one after the other and an `.srt` dropped |
| 1434 | /// last interleave in the flat list, and the display reorders them. What a |
| 1435 | /// click sets is the row's own `track`, so the *n*th row on screen has to |
| 1436 | /// pick the track it shows and the echoes have to name that same file. |
| 1437 | |
| 1438 | |
| 1439 | |
| 1440 | |
| 1441 | |
| 1442 | |
| 1443 | |
| 1444 | |
| 1445 | |
| 1446 | |
| 1447 | |
| 1448 | |
| 1449 | |
| 1450 | |
| 1451 | |
| 1452 | |
| 1453 | |
| 1454 | |
| 1455 | |
| 1456 | |
| 1457 | |
| 1458 | |
| 1459 | |
| 1460 | |
| 1461 | |
| 1462 | |
| 1463 | |
| 1464 | |
| 1465 | |
| 1466 | |
| 1467 | |
| 1468 | |
| 1469 | |
| 1470 | |
| 1471 | |
| 1472 | |
| 1473 | |
| 1474 | |
| 1475 | |
| 1476 | |
| 1477 | |
| 1478 | /// "und" is what a muxer writes when nobody said what the language is. A |
| 1479 | /// row showing it verbatim names a language nobody speaks. |
| 1480 | |
| 1481 | |
| 1482 | |
| 1483 | |
| 1484 | |
| 1485 | |
| 1486 | |
| 1487 | |
| 1488 | |
| 1489 | |
| 1490 | |
| 1491 | |
| 1492 | |
| 1493 | |
| 1494 | |
| 1495 | |
| 1496 | |
| 1497 | |
| 1498 | |
| 1499 | |
| 1500 | |
| 1501 | |
| 1502 | |
| 1503 | |
| 1504 | |
| 1505 | |
| 1506 | |
| 1507 | |
| 1508 | |
| 1509 | |
| 1510 | |
| 1511 | |
| 1512 | |
| 1513 | |
| 1514 | /// The bug: an empty timeline is end-of-stream from its one black frame |
| 1515 | /// onward, so the pump had `done` set before anything was ever pressed -- |
| 1516 | /// and the transport's restart branch read that as "played out, start from |
| 1517 | /// the top". It started a clock against a zero-length timeline, which was |
| 1518 | /// `done` again by the next repaint, so every further press restarted it |
| 1519 | /// too: the button read "Pause" and no press of it ever paused. |
| 1520 | /// |
| 1521 | /// What holds it now is one predicate, checked here against real sessions |
| 1522 | /// on both sides -- the emptied one refuses, a timeline with clips on it |
| 1523 | /// does not. |
| 1524 | |
| 1525 | |
| 1526 | |
| 1527 | |
| 1528 | |
| 1529 | |
| 1530 | |
| 1531 | |
| 1532 | |
| 1533 | |
| 1534 | |
| 1535 | |
| 1536 | |
| 1537 | |
| 1538 | |
| 1539 | |
| 1540 | |
| 1541 | |
| 1542 | |
| 1543 | |
| 1544 | |
| 1545 | |
| 1546 | |
| 1547 | |
| 1548 | |
| 1549 | |
| 1550 | |
| 1551 | |
| 1552 | |
| 1553 | |
| 1554 | |
| 1555 | |
| 1556 | |
| 1557 | |
| 1558 | /// The slider writes the same numbers the keys do, and mute is not one of |
| 1559 | /// them: dragging while muted picks the level unmuting comes back to. |
| 1560 | |
| 1561 | |
| 1562 | |
| 1563 | |
| 1564 | |
| 1565 | |
| 1566 | |
| 1567 | |
| 1568 | |
| 1569 | |
| 1570 | |
| 1571 | |
| 1572 | |
| 1573 | |
| 1574 | |
| 1575 | |
| 1576 | |
| 1577 | |
| 1578 | |
| 1579 | |
| 1580 | |
| 1581 | |
| 1582 | |
| 1583 | |
| 1584 | |
| 1585 | |
| 1586 | |
| 1587 | |
| 1588 | |
| 1589 | |
| 1590 | |
| 1591 | |
| 1592 | |
| 1593 | |
| 1594 | |
| 1595 | /// The slider lands where it paints: the arithmetic `Player::drag_volume` |
| 1596 | /// runs over the bar's own painted width, which is the one thing a test of |
| 1597 | /// it can share without re-deriving it. |
| 1598 | |
| 1599 | |
| 1600 | |
| 1601 | |
| 1602 | |
| 1603 | |
| 1604 | |
| 1605 | |
| 1606 | |
| 1607 | |
| 1608 | |
| 1609 | |
| 1610 | |
| 1611 | |
| 1612 | |
| 1613 | |
| 1614 | |
| 1615 | |
| 1616 | |
| 1617 | |
| 1618 | |
| 1619 | |
| 1620 | |
| 1621 | |
| 1622 | |
| 1623 | |
| 1624 | |
| 1625 | |
| 1626 | |
| 1627 | /// The three seams a hand may move, and the two ends neither of them may be |
| 1628 | /// dragged past: a panel dragged to nothing is a panel nobody can get back, and |
| 1629 | /// a picture squeezed out by its two neighbours is that same loss from the |
| 1630 | /// other side of the window. |
| 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 | |
| 1674 | |
| 1675 | |
| 1676 | |
| 1677 | |
| 1678 | |
| 1679 | |
| 1680 | |
| 1681 | |
| 1682 | |
| 1683 | |
| 1684 | |
| 1685 | |
| 1686 | |
| 1687 | |
| 1688 | |
| 1689 | |
| 1690 | |
| 1691 | |
| 1692 | |
| 1693 | |
| 1694 | |
| 1695 | |
| 1696 | |
| 1697 | |
| 1698 | |
| 1699 | |
| 1700 | |
| 1701 | |
| 1702 | |
| 1703 | |
| 1704 | |
| 1705 | |
| 1706 | |
| 1707 | |
| 1708 | |
| 1709 | |
| 1710 | |
| 1711 | |
| 1712 | |
| 1713 | |
| 1714 | |
| 1715 | |
| 1716 | |
| 1717 | |
| 1718 | |
| 1719 | |
| 1720 | |
| 1721 | |
| 1722 | |
| 1723 | |
| 1724 | |
| 1725 | |
| 1726 | |
| 1727 | |
| 1728 | |
| 1729 | |
| 1730 | |
| 1731 | |
| 1732 | |
| 1733 | |
| 1734 | |
| 1735 | |
| 1736 | |
| 1737 | |
| 1738 | |
| 1739 | /// The darkroom's own two seams (`Split::Dock`, `Split::Bench`): a hand may |
| 1740 | /// not drag either past its floor or its ceiling, the same promise |
| 1741 | /// [`a_dragged_divider_stops_before_either_panel_disappears`] makes for the |
| 1742 | /// legacy three. |
| 1743 | |
| 1744 | |
| 1745 | |
| 1746 | |
| 1747 | |
| 1748 | |
| 1749 | |
| 1750 | |
| 1751 | |
| 1752 | |
| 1753 | |
| 1754 | |
| 1755 | |
| 1756 | |
| 1757 | |
| 1758 | |
| 1759 | |
| 1760 | |
| 1761 | |
| 1762 | |
| 1763 | |
| 1764 | |
| 1765 | |
| 1766 | |
| 1767 | |
| 1768 | |
| 1769 | |
| 1770 | |
| 1771 | |
| 1772 | |
| 1773 | |
| 1774 | |
| 1775 | |
| 1776 | |
| 1777 | |
| 1778 | |
| 1779 | |
| 1780 | |
| 1781 | |
| 1782 | |
| 1783 | |
| 1784 | |
| 1785 | |
| 1786 | |
| 1787 | |
| 1788 | |
| 1789 | |
| 1790 | |
| 1791 | |
| 1792 | |
| 1793 | |
| 1794 | |
| 1795 | /// At the bench's floor, both default lanes' rows actually fit inside the |
| 1796 | /// `bench-lanes` column `bench_stance::render` gives them -- not just each |
| 1797 | /// row's own clamped height, but their *sum plus the gap between them*, |
| 1798 | /// since `bench-lanes` scrolls rather than clipping visibly and a sum that |
| 1799 | /// overruns the column loses its bottom row's pixels off-screen, unscrolled |
| 1800 | /// (this session's F1: the A1 lane's clip-bar border and status dot, cut by |
| 1801 | /// ~2px at the old `BENCH_MIN_H = 80.`). |
| 1802 | |
| 1803 | |
| 1804 | |
| 1805 | |
| 1806 | |
| 1807 | |
| 1808 | |
| 1809 | |
| 1810 | |
| 1811 | |
| 1812 | |
| 1813 | |
| 1814 | |
| 1815 | |
| 1816 | |
| 1817 | |
| 1818 | |
| 1819 | |
| 1820 | |
| 1821 | |
| 1822 | |
| 1823 | |
| 1824 | /// `BENCH_CHROME_H` on its own: the previous test's `box_h = BENCH_MIN_H - |
| 1825 | /// BENCH_CHROME_H` line trusts `BENCH_CHROME_H` to already be correct, so it |
| 1826 | /// cannot catch `BENCH_CHROME_H` itself drifting -- which is exactly how the |
| 1827 | /// third clip (this session's) survived it: the constant undercounted the |
| 1828 | /// section head's real line box by 1px and this test's predecessor never |
| 1829 | /// looked. Recomputes what `ui::stance::bench` actually draws above |
| 1830 | /// `bench_stance::render`'s content -- the div's own `.border_t_1()` (1px) |
| 1831 | /// + its `py(4.)` top padding + the section head's real line box at gpui's |
| 1832 | /// golden-ratio line-height, not the label's bare font size (the same trap |
| 1833 | /// `a_lane_row_fits_what_its_own_head_draws` already checks for the lane |
| 1834 | /// heads) -- and then checks the *whole* stack -- chrome, ruler, both gaps, |
| 1835 | /// both lanes, and the clear row the ledger's own fixed-position border |
| 1836 | /// needs (`LEDGER_SEAM_CLEARANCE`, not exported, so this recomputes it as |
| 1837 | /// `BENCH_MIN_H` minus every other named term) -- fits inside `BENCH_MIN_H` |
| 1838 | /// with nothing left over uncounted. This binary carries no `TestAppContext` |
| 1839 | /// to mount `ui::stance::bench` and `ui::stance::ledger` for real and read |
| 1840 | /// painted bounds back, so it stays geometry-only, same as its neighbours. |
| 1841 | |
| 1842 | |
| 1843 | |
| 1844 | |
| 1845 | |
| 1846 | |
| 1847 | |
| 1848 | |
| 1849 | |
| 1850 | |
| 1851 | |
| 1852 | |
| 1853 | |
| 1854 | |
| 1855 | |
| 1856 | |
| 1857 | |
| 1858 | |
| 1859 | |
| 1860 | |
| 1861 | |
| 1862 | |
| 1863 | |
| 1864 | |
| 1865 | |
| 1866 | |
| 1867 | |
| 1868 | |
| 1869 | |
| 1870 | |
| 1871 | |
| 1872 | |
| 1873 | |
| 1874 | |
| 1875 | |
| 1876 | |
| 1877 | /// The previous test asserted lane ROWS fit the bench column -- not that a |
| 1878 | /// lane's own CONTENT fits its row, which is how the defect it fixed |
| 1879 | /// survived it: at the old `LANE_MIN_H` of `18.` both lanes fit the bench |
| 1880 | /// exactly while V1's status dot silently overflowed into A1's row (masked) |
| 1881 | /// and A1's overflowed into the ledger (visible, since A1 has no next row). |
| 1882 | /// This binary carries no `TestAppContext` to mount a real `lane_row` and |
| 1883 | /// read its painted bounds back, so this recomputes the label's own line |
| 1884 | /// box from the constants `lane_row` actually draws with (gpui's default |
| 1885 | /// `TextStyle::line_height` is the golden ratio, not 1x the font size -- |
| 1886 | /// see `LANE_MIN_H`'s own doc comment) rather than a literal, so a future |
| 1887 | /// shrink of `LANE_MIN_H` or growth of the label size fails this instead of |
| 1888 | /// silently clipping the last lane again. |
| 1889 | |
| 1890 | |
| 1891 | |
| 1892 | |
| 1893 | |
| 1894 | |
| 1895 | |
| 1896 | |
| 1897 | |
| 1898 | |
| 1899 | |
| 1900 | |
| 1901 | |
| 1902 | |
| 1903 | |
| 1904 | |
| 1905 | |
| 1906 | /// The notice plate's own anchor ([`crate::ui::stance::notice_bottom_offset`]) |
| 1907 | /// keeps it off the bench, at *any* bench height -- not merely the floor -- |
| 1908 | /// because its bottom offset always lands at or above the bench's own top |
| 1909 | /// edge. `Player`'s live tree has no `TestAppContext` in this binary to mount |
| 1910 | /// a real `notice_plate` in and read its painted bounds back, so this checks |
| 1911 | /// the pure geometry the anchor is built from instead (F2: previously the |
| 1912 | /// plate sat at a fixed `LEDGER_H + 6.` off the ledger and covered the |
| 1913 | /// V1/A1 lane chips whenever the bench was short enough for the plate's own |
| 1914 | /// height to reach past it). |
| 1915 | |
| 1916 | |
| 1917 | |
| 1918 | |
| 1919 | |
| 1920 | |
| 1921 | |
| 1922 | |
| 1923 | |
| 1924 | |
| 1925 | |
| 1926 | |
| 1927 | |
| 1928 | |
| 1929 | |
| 1930 | |
| 1931 | |
| 1932 | |
| 1933 | |
| 1934 | /// A round trip through the file: what is saved is what the next load reads |
| 1935 | /// back, one seam touched and the other left at its default -- a scratch |
| 1936 | /// path, not the real config, the same isolation `keymap::tests`' own |
| 1937 | /// `load_from`/`save_to` already takes. |
| 1938 | |
| 1939 | |
| 1940 | |
| 1941 | |
| 1942 | |
| 1943 | |
| 1944 | |
| 1945 | |
| 1946 | |
| 1947 | |
| 1948 | |
| 1949 | |
| 1950 | |
| 1951 | |
| 1952 | |
| 1953 | /// The guard [`crate::split_drag_owes_save`] runs at the moment a drag ends |
| 1954 | /// with no further pointer event ever coming (`Player::drag_left_window`, |
| 1955 | /// wired to a live `MouseExitEvent` a `TestAppContext`-less test binary |
| 1956 | /// cannot raise -- see `tests/media.rs`'s own note on the same limit, and |
| 1957 | /// the harness drive `D2` in this session's report for the wiring itself). |
| 1958 | /// What *is* checkable here without a window: exactly the two persisted |
| 1959 | /// seams owe that save, the same set `Split::PERSISTED` already names, and a |
| 1960 | /// drag that never started (`None`) owes nothing. |
| 1961 | |
| 1962 | |
| 1963 | |
| 1964 | |
| 1965 | |
| 1966 | |
| 1967 | |
| 1968 | |
| 1969 | |
| 1970 | |
| 1971 | |
| 1972 | |
| 1973 | /// A missing file leaves every region at its default -- the silent fallback |
| 1974 | /// `load_stance_splits`'s doc comment promises. |
| 1975 | |
| 1976 | |
| 1977 | |
| 1978 | |
| 1979 | |
| 1980 | |
| 1981 | |
| 1982 | |
| 1983 | |
| 1984 | |
| 1985 | /// Every seam in the main layout has a handle on it, and every region draws |
| 1986 | /// itself at the size that handle sets: a region still measuring itself off the |
| 1987 | /// window's own share is a panel whose divider moves nothing. |
| 1988 | |
| 1989 | |
| 1990 | |
| 1991 | |
| 1992 | |
| 1993 | |
| 1994 | |
| 1995 | |
| 1996 | |
| 1997 | |
| 1998 | |
| 1999 | |
| 2000 | |
| 2001 | |
| 2002 | |
| 2003 | |
| 2004 | |
| 2005 | |
| 2006 | |
| 2007 | |
| 2008 | |
| 2009 | |
| 2010 | |
| 2011 | |
| 2012 | |
| 2013 | |
| 2014 | |
| 2015 | |
| 2016 | |
| 2017 | |
| 2018 | |
| 2019 | |
| 2020 | |
| 2021 | |
| 2022 | |
| 2023 | |
| 2024 | /// DESIGN.md §12 step 2: the stance skeleton draws its six regions -- spine, |
| 2025 | /// screen, time band, bench, ledger, dock -- in the order §5's diagram lays |
| 2026 | /// them out, and `Player::render` actually reaches it when the flag is on. |
| 2027 | |
| 2028 | |
| 2029 | |
| 2030 | |
| 2031 | |
| 2032 | |
| 2033 | |
| 2034 | |
| 2035 | |
| 2036 | |
| 2037 | |
| 2038 | |
| 2039 | |
| 2040 | |
| 2041 | |
| 2042 | |
| 2043 | |
| 2044 | |
| 2045 | |
| 2046 | |
| 2047 | |
| 2048 | |
| 2049 | |
| 2050 | |
| 2051 | |
| 2052 | |
| 2053 | |
| 2054 | |
| 2055 | |
| 2056 | |
| 2057 | |
| 2058 | |
| 2059 | |
| 2060 | |
| 2061 | |
| 2062 | |
| 2063 | |
| 2064 | |
| 2065 | |
| 2066 | |
| 2067 | |
| 2068 | |
| 2069 | |
| 2070 | |
| 2071 | |
| 2072 | |
| 2073 | |
| 2074 | |
| 2075 | |
| 2076 | |
| 2077 | |
| 2078 | |
| 2079 | |
| 2080 | |
| 2081 | |
| 2082 | /// The picture is letterboxed, never stretched: both the picture region and |
| 2083 | /// the subtitle picture overlay paint through [`letterboxed_image`] (the |
| 2084 | /// `canvas()` element that hands `ObjectFit::Contain::get_bounds` a real |
| 2085 | /// resolved size) rather than a plain `img().object_fit(...)`, which reads |
| 2086 | /// right by hand but never gets a fitted box from taffy in this pin -- see |
| 2087 | /// `render.rs`'s own doc comment on the function for the measured dead end. |
| 2088 | /// A regression back to `img(...).object_fit(` in either caller is the |
| 2089 | /// stretch-to-fill bug returning silently. |
| 2090 | |
| 2091 | |
| 2092 | |
| 2093 | |
| 2094 | |
| 2095 | |
| 2096 | |
| 2097 | |
| 2098 | |
| 2099 | |
| 2100 | |
| 2101 | |
| 2102 | |
| 2103 | |
| 2104 | |
| 2105 | |
| 2106 | |
| 2107 | |
| 2108 | |
| 2109 | |
| 2110 | |
| 2111 | |
| 2112 | |
| 2113 | |
| 2114 | |
| 2115 | |
| 2116 | |
| 2117 | /// DESIGN §8: "No full-width bars, no covering the picture, ever." The |
| 2118 | /// darkroom stance (`ui::stance::screen`) draws |
| 2119 | /// [`Player::picture_area`](crate::Player::picture_area) directly, so a |
| 2120 | /// notice surface that reaches into that method unconditionally reaches the |
| 2121 | /// picture on the darkroom path too -- measured live covering the bottom 10% |
| 2122 | /// of the frame (rows 300-333 of 335) *underneath* the stance's own |
| 2123 | /// §8-conformant plate (`ui::stance::notice_plate`), which drew the same |
| 2124 | /// notice a second time above the ledger. The legacy (non-darkroom) room |
| 2125 | /// keeps its full-width `notice_bar` exactly as it always has -- this only |
| 2126 | /// pins the darkroom path off it. |
| 2127 | |
| 2128 | |
| 2129 | |
| 2130 | |
| 2131 | |
| 2132 | |
| 2133 | |
| 2134 | |
| 2135 | |
| 2136 | |
| 2137 | |
| 2138 | |
| 2139 | |
| 2140 | |
| 2141 | |
| 2142 | |
| 2143 | |
| 2144 | |
| 2145 | |
| 2146 | /// DESIGN §5/§11 check 6, the fourth occlusion defect (notice bar, export |
| 2147 | /// card, preview badge, now menus): every floating menu that can open above |
| 2148 | /// the picture -- the clip context menu, the picker, the library menu -- must |
| 2149 | /// size its scrolling list against `stance::menu_floor`'s room, not the raw |
| 2150 | /// window. Sizing against the whole viewport is exactly the bug that shipped: |
| 2151 | /// a menu taller than the bench/ledger/dock footprint got clamped by |
| 2152 | /// `menu_at`'s own bottom-edge fit back up over the picture, because nothing |
| 2153 | /// had told the list it only had the footprint to grow into. This pins the |
| 2154 | /// general rule so the next surface someone floats -- a fourth menu, a fifth |
| 2155 | /// occlusion -- cannot silently reintroduce `menu_rows_h(rows.len(), |
| 2156 | /// viewport)` in its place. |
| 2157 | |
| 2158 | |
| 2159 | |
| 2160 | |
| 2161 | |
| 2162 | |
| 2163 | |
| 2164 | |
| 2165 | |
| 2166 | |
| 2167 | |
| 2168 | |
| 2169 | |
| 2170 | |
| 2171 | |
| 2172 | |
| 2173 | |
| 2174 | |
| 2175 | |
| 2176 | |
| 2177 | |
| 2178 | |
| 2179 | /// The settings page's own organising rule: PROJECT rows open only the |
| 2180 | /// doors that write into the `.edith` file ([`Player::open_picker`], |
| 2181 | /// [`Player::open_mix`]), and EDITOR rows open only the doors that do not |
| 2182 | /// ([`Player::toggle_proxies`], [`Player::toggle_auto_proxies`], |
| 2183 | /// [`Player::open_subtitle_style`]) -- never the config-file writers |
| 2184 | /// (`ui::dock_stance::config_path`/`ui::theme::config_path`/ |
| 2185 | /// `keymap::Keymap::config_path`) directly, which every editor-side row |
| 2186 | /// already routes around through its own opener. A row wired to the wrong |
| 2187 | /// section's opener is exactly the regression a page organised around two |
| 2188 | /// headings invites; this pins each half to its own doors so the two lists |
| 2189 | /// cannot cross. |
| 2190 | |
| 2191 | |
| 2192 | |
| 2193 | |
| 2194 | |
| 2195 | |
| 2196 | |
| 2197 | |
| 2198 | |
| 2199 | |
| 2200 | |
| 2201 | |
| 2202 | |
| 2203 | |
| 2204 | |
| 2205 | |
| 2206 | |
| 2207 | |
| 2208 | |
| 2209 | |
| 2210 | |
| 2211 | |
| 2212 | |
| 2213 | |
| 2214 | |
| 2215 | |
| 2216 | |
| 2217 | |
| 2218 | |
| 2219 | |
| 2220 | |
| 2221 | |
| 2222 | |
| 2223 | |
| 2224 | /// D1's own class, pinned per row rather than per section: a row's hint can |
| 2225 | /// claim a `~/.config/edith` default (the section header claims nothing on |
| 2226 | /// its own since [`settings_project_and_editor_sections_open_disjoint_doors`]'s |
| 2227 | /// commit, so a lying section head no longer slips past a reviewer -- but a |
| 2228 | /// lying *row* hint did, on Proxies, because nothing scanned row text at all). |
| 2229 | /// For every row whose own hint text names that file, this requires the |
| 2230 | /// matching `save_*_pref`/`load_*_pref` pair to actually exist in |
| 2231 | /// `player/library.rs` -- the exact gap Proxies shipped with: a hint promising |
| 2232 | /// a default the row's own door never wrote. |
| 2233 | |
| 2234 | |
| 2235 | |
| 2236 | |
| 2237 | |
| 2238 | |
| 2239 | |
| 2240 | |
| 2241 | |
| 2242 | |
| 2243 | |
| 2244 | |
| 2245 | |
| 2246 | |
| 2247 | |
| 2248 | |
| 2249 | |
| 2250 | |
| 2251 | |
| 2252 | |
| 2253 | |
| 2254 | |
| 2255 | |
| 2256 | |
| 2257 | /// With no project open, a PROJECT row must not fall back to a bare noun |
| 2258 | /// ("Size"/"Rate"/"HDR") standing in the value slot -- it reads as a value |
| 2259 | /// while carrying none. This binary has no `TestAppContext` to actually |
| 2260 | /// render the page with `player.session` empty, so this is a source scan |
| 2261 | /// for the fallback strings the bug shipped as, same as the guard above it. |
| 2262 | |
| 2263 | |
| 2264 | |
| 2265 | |
| 2266 | |
| 2267 | |
| 2268 | |
| 2269 | |
| 2270 | |
| 2271 | |
| 2272 | |
| 2273 | |
| 2274 | |
| 2275 | |
| 2276 | /// The HDR reference rows must read the file's own declared numbers off |
| 2277 | /// [`engine::colorspace::ContentLight`] -- not invent a monitor override the |
| 2278 | /// engine has nowhere to persist -- and must fall back to the page's one |
| 2279 | /// established empty state (a bare `—` in `INK4`, [`row_ink`]/[`row_static`]'s |
| 2280 | /// own idiom) rather than a second placeholder idiom. No `TestAppContext` |
| 2281 | /// here either, so this is the same source-scan the guard above it is. |
| 2282 | |
| 2283 | |
| 2284 | |
| 2285 | |
| 2286 | |
| 2287 | |
| 2288 | |
| 2289 | |
| 2290 | |
| 2291 | |
| 2292 | |
| 2293 | |
| 2294 | |
| 2295 | |
| 2296 | |
| 2297 | |
| 2298 | |
| 2299 | |
| 2300 | |
| 2301 | |
| 2302 | |
| 2303 | |
| 2304 | |
| 2305 | |
| 2306 | |
| 2307 | |
| 2308 | /// The parity class this user has reported four separate times: "some |
| 2309 | /// options are only reachable via keyboard shortcut". A source scan (this |
| 2310 | /// binary has no `TestAppContext` to click through) over every darkroom |
| 2311 | /// surface -- the spine, the dock, the bench/timeband transport, the |
| 2312 | /// settings page, the maximized cards and the clip context menu |
| 2313 | /// (`menus.rs`'s `MENU_ITEMS`, rendered mouse-and-chord-visible by |
| 2314 | /// `overlays.rs`) -- for a literal `ActionId::<variant>` mention. An |
| 2315 | /// [`ActionId`] reachable by chord ([`Keymap::defaults`]) but absent from |
| 2316 | /// every one of those texts has no mouse door into the darkroom at all, |
| 2317 | /// which is exactly this bug's shape (`Fit` and `Redo` shipped that way |
| 2318 | /// until this commit). |
| 2319 | /// |
| 2320 | /// [`ActionId::Resolution`] and [`ActionId::SubtitleStyle`] are the two |
| 2321 | /// deliberate exceptions: their settings-page rows open them through |
| 2322 | /// `Pick::Resolution` and `open_subtitle_style(cx)` respectively, never |
| 2323 | /// spelling the action name itself, so each is matched on its own door |
| 2324 | /// string instead. |
| 2325 | /// |
| 2326 | /// [`ALLOWED_CHORD_ONLY`] is the honest remainder: fine-grained playhead/edit |
| 2327 | /// strokes with no button in the *legacy* tree either (`toolbar.rs`, |
| 2328 | /// `inspector.rs`, `library.rs` were all swept for the same names and come |
| 2329 | /// up equally empty) -- not a regression this task closes, just an existing |
| 2330 | /// keyboard-only stroke this editor has never given a face. |
| 2331 | |
| 2332 | |
| 2333 | |
| 2334 | |
| 2335 | |
| 2336 | |
| 2337 | |
| 2338 | |
| 2339 | |
| 2340 | |
| 2341 | |
| 2342 | |
| 2343 | |
| 2344 | |
| 2345 | |
| 2346 | |
| 2347 | |
| 2348 | |
| 2349 | |
| 2350 | |
| 2351 | |
| 2352 | |
| 2353 | |
| 2354 | |
| 2355 | |
| 2356 | |
| 2357 | |
| 2358 | |
| 2359 | |
| 2360 | |
| 2361 | |
| 2362 | |
| 2363 | |
| 2364 | |
| 2365 | |
| 2366 | |
| 2367 | |
| 2368 | |
| 2369 | |
| 2370 | |
| 2371 | |
| 2372 | |
| 2373 | |
| 2374 | |
| 2375 | |
| 2376 | |
| 2377 | |
| 2378 | |
| 2379 | |
| 2380 |