PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
Merge PR #3788: M5: drag a line's ends (and a polygon's corners) to change its length and angle
aiongg145a08ae966d
diff --cc ROADMAP.mdindex 96f6ede4b,3dc22e4a2..36b023cab--- a/ROADMAP.md+++ b/ROADMAP.md@@@ -172,9 -172,7 +172,10 @@@ Ranked; detail and the full milestone t## Progress log+- **2026-10-20 (M6, calculation order page):** Prepare a form ▸ Calculation order, a page of its own, lists the calculated fields in the order they calculate with their formulas and values, moved with Up/Down arrows (as Acrobat's Set Field Calculation Order), Alt+↑/↓ or by dragging. A card says what is wrong with the order and holds Fix order; a loop has a card of its own that opens one of its formulas. On the page, each calculated field shows its step, and arrows show what the field in focus reads and what reads it. Estimates unchanged.+- **2026-10-20 (M6, calculation order):** The order a form's fields calculate in (`/CO`) is read, checked, fixed and set headlessly with `form_calculation_order`: it says which fields read one calculated later (they show stale values), which read each other in a loop, and which the PDF's order leaves out; Fix order moves only what must move, in one undo step, and the form recalculates. Editing a formula no longer moves its field to the end of the order, and a field the order lists twice calculates once. Estimates unchanged.+- **2026-10-19 (M6, renames keep formulas):** Renaming a field renames it in every calculation that reads it, in the same undo step: `AFSimple_Calculate` field lists, simplified field notation (the comment and the JavaScript after it) and `getField` calls naming it in one string literal; the rest of each script is kept as written. A sum used to drop the renamed field, notation read it as 0 and a script kept a stale value. Field Properties says how many formulas changed and `form_set_props` lists them as `formulas_updated`. Names built at run time and other events' scripts are not rewritten. Estimates unchanged.+ - **2026-10-20 (M5, reshape lines):** A line or arrow could only be moved after it was drawn; its length and angle stayed. A selected line, connected lines, polygon or cloud now has a handle on each end or corner: dragging one reshapes it (Shift holds it to 45°), as one undo step, with the new shape drawn while dragging. `pdfcraft_annot::set_points`, `Edit::ReshapeAnnotation`, `comment_edit points`; comment lists carry the points. Estimates unchanged.- **2026-10-19 (M14, #3373):** The main menu and its long submenus scroll in short windows, keeping their commands reachable. Estimates unchanged.diff --cc crates/ui-egui/src/i18n/ar.tsvindex f6b3d093d,8f5a91ba8..3ba63e9b9--- a/crates/ui-egui/src/i18n/ar.tsv+++ b/crates/ui-egui/src/i18n/ar.tsv@@@ -2749,11 -2711,5 +2749,13 @@@ certificate Version الإصدا�Make properties default جعل الخصائص افتراضيةPages selected الصفحات المحددةPage properties خصائص الصفحة+ Bulleted list قائمة نقطية+ Numbered list قائمة مرقمة+ Alignment المحاذاة+ Superscript نص مرتفع+ Subscript نص منخفض+ Paragraph spacing تباعد الفقرات+ Less أقل+ Other options خيارات أخرى+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment إعادة تشكيل التعليقdiff --cc crates/ui-egui/src/i18n/bg.tsvindex 90e152c27,28614a008..5ffb53a3c--- a/crates/ui-egui/src/i18n/bg.tsv+++ b/crates/ui-egui/src/i18n/bg.tsv@@@ -2435,12 -2397,5 +2435,14 @@@ animation effects Off Изключен�Make properties default Задаване като свойства по подразбиранеPages selected Избрани странициPage properties Свойства на страницата+ Font Шрифт+ Bulleted list Списък с водещи символи+ Numbered list Номериран списък+ Alignment Подравняване+ Superscript Горен индекс+ Subscript Долен индекс+ Paragraph spacing Разстояние между абзаците+ Less По-малко+ Other options Други опции+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Промяна на формата на коментараdiff --cc crates/ui-egui/src/i18n/cs.tsvindex 1366cb254,82698a497..b97ea9d44--- a/crates/ui-egui/src/i18n/cs.tsv+++ b/crates/ui-egui/src/i18n/cs.tsv@@@ -2546,12 -2508,5 +2546,14 @@@ animation effects Off VypnutMake properties default Nastavit vlastnosti jako výchozíPages selected Vybrané stránkyPage properties Vlastnosti stránky+ Font Písmo+ Bulleted list Odrážkový seznam+ Numbered list Číslovaný seznam+ Alignment Zarovnání+ Superscript Horní index+ Subscript Dolní index+ Paragraph spacing Mezera mezi odstavci+ Less Méně+ Other options Další možnosti+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Změnit tvar komentářediff --cc crates/ui-egui/src/i18n/de.tsvindex ac136cd91,bc685e0df..4569808ff--- a/crates/ui-egui/src/i18n/de.tsv+++ b/crates/ui-egui/src/i18n/de.tsv@@@ -2473,12 -2435,5 +2473,14 @@@ animation effects Off AuMake properties default Eigenschaften als Standard festlegenPages selected Ausgewählte SeitenPage properties Seiteneigenschaften+ Font Schrift+ Bulleted list Aufzählung+ Numbered list Nummerierte Liste+ Alignment Ausrichtung+ Superscript Hochgestellt+ Subscript Tiefgestellt+ Paragraph spacing Absatzabstand+ Less Weniger+ Other options Weitere Optionen+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Kommentar umformendiff --cc crates/ui-egui/src/i18n/el.tsvindex 133e8ca8e,4b5a5ea9b..4bd39b370--- a/crates/ui-egui/src/i18n/el.tsv+++ b/crates/ui-egui/src/i18n/el.tsv@@@ -2478,12 -2440,5 +2478,14 @@@ animation effects Off Ανενεργ�Make properties default Ορισμός ιδιοτήτων ως προεπιλογήPages selected Επιλεγμένες σελίδεςPage properties Ιδιότητες σελίδας+ Font Γραμματοσειρά+ Bulleted list Λίστα με κουκκίδες+ Numbered list Αριθμημένη λίστα+ Alignment Στοίχιση+ Superscript Εκθέτης+ Subscript Δείκτης+ Paragraph spacing Απόσταση παραγράφων+ Less Λιγότερα+ Other options Άλλες επιλογές+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Αλλαγή σχήματος σχολίουdiff --cc crates/ui-egui/src/i18n/fr.tsvindex aa83f8197,5758900f2..5d3cbb120--- a/crates/ui-egui/src/i18n/fr.tsv+++ b/crates/ui-egui/src/i18n/fr.tsv@@@ -2472,12 -2434,5 +2472,14 @@@ animation effects Off DésactivéMake properties default Définir comme propriétés par défautPages selected Pages sélectionnéesPage properties Propriétés de la page+ Font Police+ Bulleted list Liste à puces+ Numbered list Liste numérotée+ Alignment Alignement+ Superscript Exposant+ Subscript Indice+ Paragraph spacing Espacement des paragraphes+ Less Moins+ Other options Autres options+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Modifier la forme du commentairediff --cc crates/ui-egui/src/i18n/hu.tsvindex 123be343f,6966f9800..e18b4cefc--- a/crates/ui-egui/src/i18n/hu.tsv+++ b/crates/ui-egui/src/i18n/hu.tsv@@@ -2471,12 -2433,5 +2471,14 @@@ animation effects Off KMake properties default Tulajdonságok beállítása alapértelmezettkéntPages selected Kijelölt oldalakPage properties Oldaltulajdonságok+ Font Betűtípus+ Bulleted list Felsorolás+ Numbered list Számozott lista+ Alignment Igazítás+ Superscript Felső index+ Subscript Alsó index+ Paragraph spacing Bekezdéstávolság+ Less Kevesebb+ Other options Egyéb beállítások+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Megjegyzés alakjának módosításadiff --cc crates/ui-egui/src/i18n/it.tsvindex 71715dc5d,bc1d6d132..9be91dbcd--- a/crates/ui-egui/src/i18n/it.tsv+++ b/crates/ui-egui/src/i18n/it.tsv@@@ -2684,12 -2646,5 +2684,14 @@@ certificate Key usage Utilizzo chiavcertificate Self-signed Autofirmatocertificate SHA-1 digest Impronta SHA-1certificate SHA-256 digest Impronta SHA-256+ Font Carattere+ Bulleted list Elenco puntato+ Numbered list Elenco numerato+ Alignment Allineamento+ Superscript Apice+ Subscript Pedice+ Paragraph spacing Spaziatura paragrafi+ Less Meno+ Other options Altre opzioni+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Modifica la forma del commentodiff --cc crates/ui-egui/src/i18n/ja.tsvindex f73e753de,16d795186..42c96799d--- a/crates/ui-egui/src/i18n/ja.tsv+++ b/crates/ui-egui/src/i18n/ja.tsv@@@ -2472,12 -2434,5 +2472,14 @@@ animation effects Off オ�Make properties default プロパティをデフォルトに設定Pages selected 選択したページPage properties ページのプロパティ+ Font フォント+ Bulleted list 箇条書き+ Numbered list 番号付きリスト+ Alignment 配置+ Superscript 上付き+ Subscript 下付き+ Paragraph spacing 段落間隔+ Less 折りたたむ+ Other options その他のオプション+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment コメントの形状を変更diff --cc crates/ui-egui/src/i18n/kk.tsvindex 7f113d4bf,4a9fe2379..902366b5b--- a/crates/ui-egui/src/i18n/kk.tsv+++ b/crates/ui-egui/src/i18n/kk.tsv@@@ -2470,12 -2432,5 +2470,14 @@@ animation effects Off Өшірул�Make properties default Қасиеттерді әдепкі етуPages selected Таңдалған беттерPage properties Бет қасиеттері+ Font Қаріп+ Bulleted list Таңбалауыш тізім+ Numbered list Нөмірленген тізім+ Alignment Туралау+ Superscript Жоғарғы индекс+ Subscript Төменгі индекс+ Paragraph spacing Абзац аралығы+ Less Азырақ+ Other options Басқа параметрлер+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Пікір пішінін өзгертуdiff --cc crates/ui-egui/src/i18n/lt.tsvindex 6448c6949,2899684a6..7007f2af9--- a/crates/ui-egui/src/i18n/lt.tsv+++ b/crates/ui-egui/src/i18n/lt.tsv@@@ -2723,11 -2685,5 +2723,13 @@@ key Space TarpaThe password must have at least 6 characters. Slaptažodį turi sudaryti bent 6 simboliai.This file changed on disk. Reload it to see the new version; your unsaved changes will be lost. Šis failas diske pasikeitė. Įkelkite jį iš naujo, kad pamatytumėte naują versiją; neįrašyti pakeitimai bus prarasti.theme Appearance Išvaizda+ Bulleted list Sąrašas su ženkleliais+ Numbered list Numeruotas sąrašas+ Alignment Lygiuotė+ Superscript Viršutinis indeksas+ Subscript Apatinis indeksas+ Paragraph spacing Tarpas tarp pastraipų+ Less Mažiau+ Other options Kitos parinktys+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Keisti komentaro formądiff --cc crates/ui-egui/src/i18n/pl.tsvindex 578b512bb,b6539c848..3f2a3a604--- a/crates/ui-egui/src/i18n/pl.tsv+++ b/crates/ui-egui/src/i18n/pl.tsv@@@ -2448,12 -2410,5 +2448,14 @@@ animation effects Off WyłączonMake properties default Ustaw właściwości jako domyślnePages selected Zaznaczone stronyPage properties Właściwości strony+ Font Czcionka+ Bulleted list Lista punktowana+ Numbered list Lista numerowana+ Alignment Wyrównanie+ Superscript Indeks górny+ Subscript Indeks dolny+ Paragraph spacing Odstęp między akapitami+ Less Mniej+ Other options Inne opcje+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Zmień kształt komentarzadiff --cc crates/ui-egui/src/i18n/pt-br.tsvindex ee12fe7ab,3d2b4ef68..73fb01255--- a/crates/ui-egui/src/i18n/pt-br.tsv+++ b/crates/ui-egui/src/i18n/pt-br.tsv@@@ -2486,12 -2448,5 +2486,14 @@@ animation effects Off DesativadoMake properties default Tornar propriedades padrãoPages selected Páginas selecionadasPage properties Propriedades da página+ Font Fonte+ Bulleted list Lista com marcadores+ Numbered list Lista numerada+ Alignment Alinhamento+ Superscript Sobrescrito+ Subscript Subscrito+ Paragraph spacing Espaçamento entre parágrafos+ Less Menos+ Other options Outras opções+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Alterar a forma do comentáriodiff --cc crates/ui-egui/src/i18n/ru.tsvindex 3baec4560,9649324d7..7e50b2a90--- a/crates/ui-egui/src/i18n/ru.tsv+++ b/crates/ui-egui/src/i18n/ru.tsv@@@ -2385,12 -2347,5 +2385,14 @@@ animation effects Off Вык�Make properties default Сделать свойства стандартнымиPages selected Выделенные страницыPage properties Свойства страницы+ Font Шрифт+ Bulleted list Маркированный список+ Numbered list Нумерованный список+ Alignment Выравнивание+ Superscript Надстрочный+ Subscript Подстрочный+ Paragraph spacing Интервал между абзацами+ Less Меньше+ Other options Другие параметры+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Изменить форму комментарияdiff --cc crates/ui-egui/src/i18n/sl.tsvindex 5ba9dc90c,1d1a94146..3bf1ab551--- a/crates/ui-egui/src/i18n/sl.tsv+++ b/crates/ui-egui/src/i18n/sl.tsv@@@ -2477,12 -2439,5 +2477,14 @@@ animation effects Off IzklopljenMake properties default Nastavi lastnosti kot privzetePages selected Izbrane straniPage properties Lastnosti strani+ Font Pisava+ Bulleted list Označen seznam+ Numbered list Oštevilčen seznam+ Alignment Poravnava+ Superscript Nadpisano+ Subscript Podpisano+ Paragraph spacing Razmik med odstavki+ Less Manj+ Other options Druge možnosti+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Spremeni obliko komentarjadiff --cc crates/ui-egui/src/i18n/te.tsvindex e0d6a2b34,b24857baa..da5bc68f2--- a/crates/ui-egui/src/i18n/te.tsv+++ b/crates/ui-egui/src/i18n/te.tsv@@@ -2381,12 -2343,5 +2381,14 @@@ animation effects Off ఆఫ�Make properties default లక్షణాలను డిఫాల్ట్గా చేయిPages selected ఎంచుకున్న పేజీలుPage properties పేజీ లక్షణాలు+ Font ఫాంట్+ Bulleted list బుల్లెట్ జాబితా+ Numbered list సంఖ్యల జాబితా+ Alignment అమరిక+ Superscript సూపర్స్క్రిప్ట్+ Subscript సబ్స్క్రిప్ట్+ Paragraph spacing పేరా అంతరం+ Less తక్కువ+ Other options ఇతర ఎంపికలు+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment వ్యాఖ్య ఆకారాన్ని మార్చుdiff --cc crates/ui-egui/src/i18n/tr.tsvindex 48d34a30d,ba4f925ab..e17792fcd--- a/crates/ui-egui/src/i18n/tr.tsv+++ b/crates/ui-egui/src/i18n/tr.tsv@@@ -2468,12 -2430,5 +2468,14 @@@ animation effects Off Kapal�Make properties default Özellikleri varsayılan yapPages selected Seçilen sayfalarPage properties Sayfa özellikleri+ Font Yazı tipi+ Bulleted list Madde işaretli liste+ Numbered list Numaralı liste+ Alignment Hizalama+ Superscript Üst simge+ Subscript Alt simge+ Paragraph spacing Paragraf aralığı+ Less Daha az+ Other options Diğer seçenekler+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Yorumun şeklini değiştirdiff --cc crates/ui-egui/src/i18n/uk.tsvindex 246a4a2c5,ed2a631a8..cf634d734--- a/crates/ui-egui/src/i18n/uk.tsv+++ b/crates/ui-egui/src/i18n/uk.tsv@@@ -2494,12 -2456,5 +2494,14 @@@ animation effects Off Вимкнен�Make properties default Зробити властивості типовимиPages selected Вибрані сторінкиPage properties Властивості сторінки+ Font Шрифт+ Bulleted list Маркований список+ Numbered list Нумерований список+ Alignment Вирівнювання+ Superscript Надрядковий+ Subscript Підрядковий+ Paragraph spacing Інтервал між абзацами+ Less Менше+ Other options Інші параметри+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment Змінити форму коментаряdiff --cc crates/ui-egui/src/i18n/zh-hans.tsvindex 645c0ab30,707bd7d36..f99808c35--- a/crates/ui-egui/src/i18n/zh-hans.tsv+++ b/crates/ui-egui/src/i18n/zh-hans.tsv@@@ -2436,12 -2398,5 +2436,14 @@@ animation effects Off �Make properties default 将属性设为默认Pages selected 选定的页面Page properties 页面属性+ Font 字体+ Bulleted list 项目符号列表+ Numbered list 编号列表+ Alignment 对齐+ Superscript 上标+ Subscript 下标+ Paragraph spacing 段落间距+ Less 收起+ Other options 其他选项+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment 更改注释形状diff --cc crates/ui-egui/src/i18n/zh-hant.tsvindex 712f0666a,b1d26f226..9382739d1--- a/crates/ui-egui/src/i18n/zh-hant.tsv+++ b/crates/ui-egui/src/i18n/zh-hant.tsv@@@ -2422,12 -2384,5 +2422,14 @@@ animation effects Off �Make properties default 將內容設為預設Pages selected 選取的頁面Page properties 頁面屬性+ Font 字型+ Bulleted list 項目符號清單+ Numbered list 編號清單+ Alignment 對齊+ Superscript 上標+ Subscript 下標+ Paragraph spacing 段落間距+ Less 收起+ Other options 其他選項+ # Lines, connected lines and polygons reshaped by their ends and corners (M5).+ Reshape comment 變更註解形狀