Skip to content

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.md
index 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.tsv
index 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.tsv
index 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.tsv
index 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 Vypnut
Make properties default Nastavit vlastnosti jako výchozí
Pages selected Vybrané stránky
Page 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áře
diff --cc crates/ui-egui/src/i18n/de.tsv
index 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 Au
Make properties default Eigenschaften als Standard festlegen
Pages selected Ausgewählte Seiten
Page 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 umformen
diff --cc crates/ui-egui/src/i18n/el.tsv
index 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.tsv
index 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éfaut
Pages selected Pages sélectionnées
Page 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 commentaire
diff --cc crates/ui-egui/src/i18n/hu.tsv
index 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 K
Make properties default Tulajdonságok beállítása alapértelmezettként
Pages selected Kijelölt oldalak
Page 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ása
diff --cc crates/ui-egui/src/i18n/it.tsv
index 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 chiav
certificate Self-signed Autofirmato
certificate SHA-1 digest Impronta SHA-1
certificate 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 commento
diff --cc crates/ui-egui/src/i18n/ja.tsv
index 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.tsv
index 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.tsv
index 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 Tarpa
The 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.tsv
index 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łączon
Make properties default Ustaw właściwości jako domyślne
Pages selected Zaznaczone strony
Page 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 komentarza
diff --cc crates/ui-egui/src/i18n/pt-br.tsv
index 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 Desativado
Make properties default Tornar propriedades padrão
Pages selected Páginas selecionadas
Page 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ário
diff --cc crates/ui-egui/src/i18n/ru.tsv
index 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.tsv
index 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 Izklopljen
Make properties default Nastavi lastnosti kot privzete
Pages selected Izbrane strani
Page 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 komentarja
diff --cc crates/ui-egui/src/i18n/te.tsv
index 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.tsv
index 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 yap
Pages selected Seçilen sayfalar
Page 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ştir
diff --cc crates/ui-egui/src/i18n/uk.tsv
index 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.tsv
index 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.tsv
index 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 變更註解形狀