Show annotation actions beside selected text (#1133)
* M5: show actions for selected page text * Selection actions: literal labels (so catalogs can cover them), no unwrap or unreachable * Catalogs: Add comment in every interface language; refresh hashes --------- Co-authored-by: Brandon Thomas <echelon@gmail.com>
This commit is contained in:
parent
377f8da36b
commit
f94c4a6ffd
|
|
@ -7,7 +7,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Greek UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "fbc7790b5e9afd591b3bfbe0582f004f345b42d988989d81fdf38f312331fa01"
|
||||
sha256 = "bd7d565bff34f6f73b90b0884f480b9f39b106d5c96953e17c68619f03385a57"
|
||||
|
||||
# ATTRIBUTION.toml: one entry per asset (AGENTS.md §1). The source of truth for provenance and licences.
|
||||
# ATTRIBUTION.md is generated from this file: `cargo xtask assets --write`. Checked by `cargo xtask assets` (part of `xtask ci`).
|
||||
|
|
@ -30,7 +30,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Simplified Chinese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "fc734b2f2530561f8630f5d7112a237201012789b1d9167d3068b4ddb7b22f43"
|
||||
sha256 = "de11e8f3b126092b584beb8b22ea8952ff6cbc79d42c417663843be93c807bc4"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/zh-hant.tsv"
|
||||
|
|
@ -41,7 +41,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Traditional Chinese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "379d0dc6203104e0f07ea0ed1e74a365c8eec7f9cf2bf525078dac0cf58b6372"
|
||||
sha256 = "8ddfd156833e29d8584dab85520264d8e5d77bfcdb5ea994577acc1a9644936b"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/cs.tsv"
|
||||
|
|
@ -52,7 +52,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Czech UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "b416309efba61009d4ed92c932cf1b23bb4f3a53d0d7d35cf61bf9c3d7a011ef"
|
||||
sha256 = "67abad667c05dc10bc9bffab5302978bc73b8314f63f78b543cdece4b5cea6d7"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/pt-br.tsv"
|
||||
|
|
@ -63,7 +63,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Brazilian Portuguese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "066efa560b0dc5554c85194dcfb3190e03fce75145d52151bdcf7734f1829f7e"
|
||||
sha256 = "a8d35613c888904ce6e984560c06d54a3c6f9828fa840c733eb9f2f893b8c0ee"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/es.tsv"
|
||||
|
|
@ -74,7 +74,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Spanish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "9061bbb9b21008b4c312b5158ed3c338cfbcb3b563e9e57b81cf72d075c9eadf"
|
||||
sha256 = "2820b2a68796bfcd2bb4b5e71daad25991e95bf48b3c3edf60c2e3adcc10ce88"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/fr.tsv"
|
||||
|
|
@ -85,7 +85,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "French UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "068211fb4b246e1cb0ecb66598101f1c974e0313e1323e6acd522817f7f3bb57"
|
||||
sha256 = "a099eb8c6c4bdbd62dc32efef97b4bef718c0170492e6921568d48e46499c964"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/de.tsv"
|
||||
|
|
@ -96,7 +96,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "German UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "a2228f72e63c83959ea0ee7b1641bcf31e13b3c58fab62caebbd50f8d8d5c231"
|
||||
sha256 = "e59dc41d7628503fd241689efb69641bcf31733a204f3cd492ac88d66c76c6a0"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/te.tsv"
|
||||
|
|
@ -107,7 +107,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Telugu UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "8c2b1625fb84fa7c9279d2ca0d6a22c808514d6361cf3c547a7ee21c64d170ae"
|
||||
sha256 = "c6ab6587ad3ecd56efb019a18eb71f92fca33c43ead8eb9fc3262b8c56e5beb1"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/it.tsv"
|
||||
|
|
@ -118,7 +118,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Italian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "394d322e782343f95c3b9cce603a77b7e3a6625000540a17f45b55b7233e7662"
|
||||
sha256 = "1fa0e8bba340d78ecf2a3c9ae319b34e99811082950ebf4aee5e7f5eb0bdab22"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/pl.tsv"
|
||||
|
|
@ -129,7 +129,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Polish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "5c5c0420cf58767312b132b9f9cb3c23131b58b831feae3e47b421f1081fe60b"
|
||||
sha256 = "4297893b78fa25368d9bb6e10485fb3ede866ed470e528001de0120ea2f0915b"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/ru.tsv"
|
||||
|
|
@ -140,7 +140,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Russian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "1d130f3f7112ac99693c5048a96405f3371dbe893d5c618f2910b8e80b6be28c"
|
||||
sha256 = "a84ccfd96c9704d1630d6b42b1c50298a0ea5791b063ff2bbe1ccc993f87cc47"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/hu.tsv"
|
||||
|
|
@ -151,7 +151,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Hungarian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "a6ff8309a391acc428cb67e834196e14919ab5cc0f2d9befcbfb532d2ec4ca82"
|
||||
sha256 = "da6aee2a47ec15193a3d88f8116f2b81ec1ac815b9481eb9c36d48518625df30"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/bg.tsv"
|
||||
|
|
@ -162,7 +162,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Bulgarian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "40391d7be25e2a4e59cb1419df733935e69dd728fb0a3404575edc6807f27924"
|
||||
sha256 = "122cc1b0a346a8ff4cb7ede77775afbd326e82c9bfd6bda06f895ac100702144"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/kk.tsv"
|
||||
|
|
@ -173,7 +173,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Kazakh UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "27fa6fae5ad0005f90a13612aa1eb8189061110eab8d6b6e7a83899af54f13e9"
|
||||
sha256 = "5eb3ccd3c7613fd54b4a217ddaf32f29a37efb29373787a3178209ae3aca12a5"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/ja.tsv"
|
||||
|
|
@ -184,7 +184,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Japanese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "f4e6217dfc370ffa947c07b8c23bfa7d8f3824d881d7d51062b471b95f378c82"
|
||||
sha256 = "ffbf8a2c117d75b008361e882c96c9d7cad8844e791800a60174eacf96e3c89a"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/uk.tsv"
|
||||
|
|
@ -195,7 +195,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Ukrainian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "c3f539ce99a39a6f7a89740da9b7aab9643014613bfef1891efe777dc5cf057a"
|
||||
sha256 = "424e5f16bead85250d142e791b5e8a874c9905025be052ed8aef1f1645e5585a"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/ar.tsv"
|
||||
|
|
@ -206,7 +206,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Arabic UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "1cf9e140b348f1e8ceb399a8f079cae392085d9f432e3e1b9d94cd1039a1c4b8"
|
||||
sha256 = "63d26bec54aa6e9f9c4b6e4dc16b872a41ace7feec825c888633992ca1507148"
|
||||
|
||||
[[asset]]
|
||||
path = "crates/ui-egui/src/i18n/tr.tsv"
|
||||
|
|
@ -217,7 +217,7 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Turkish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "9d52789a71fe9b0a7cc74cfd6e9e6d0a8b3d9b9a866922676e376f1431d1cae3"
|
||||
sha256 = "0b330a5e739159d02a8214af4655e954cba59861ca30b914614ffb0f2735e52d"
|
||||
|
||||
[[asset]]
|
||||
path = "assets/icons/accessibility.svg"
|
||||
|
|
@ -3339,4 +3339,4 @@ licence = "MIT OR Apache-2.0"
|
|||
licence_file = "LICENSE-MIT"
|
||||
kind = "translation"
|
||||
usage = "Slovene UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
|
||||
sha256 = "c5e3a75359a8faadb9efa9ac4ff31963cf9124c20269a1e21715bcabde5e1292"
|
||||
sha256 = "7071df48ebdb362914f404deebebc84252550d10d08f333892584230efa6c1d6"
|
||||
|
|
|
|||
|
|
@ -2995,6 +2995,9 @@ pub fn document_area(app: &mut PdfCraftApp, index: usize, ui: &mut egui::Ui) {
|
|||
|
||||
view.viewport_screen = out.inner_rect;
|
||||
view.auto_scroll.paint(ui, avail);
|
||||
if unobstructed && matches!(tool, QuickTool::Select | QuickTool::ColumnSelect) {
|
||||
selection_actions(ui, avail, view, info, prefs, allowed && !comments_hidden);
|
||||
}
|
||||
|
||||
// Collect all main-page demand, including cached surfaces, for byte admission later.
|
||||
// Pan-settle debounce for tiled pages: each tile costs a full page interpret, so holding
|
||||
|
|
@ -3263,6 +3266,92 @@ pub fn document_area(app: &mut PdfCraftApp, index: usize, ui: &mut egui::Ui) {
|
|||
quick_bar(app, avail, ui);
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
enum SelectionAction {
|
||||
Note,
|
||||
Markup(comments::CommentTool),
|
||||
Replace,
|
||||
Copy,
|
||||
}
|
||||
|
||||
/// Actions on an existing text selection, next to the selected words.
|
||||
fn selection_actions(ui: &mut egui::Ui, viewport: Rect, view: &mut DocView, info: &DocInfo, prefs: &comments::CommentPrefs, can_comment: bool) {
|
||||
if ui.input(|input| input.pointer.is_decidedly_dragging()) {
|
||||
return;
|
||||
}
|
||||
let Some(selection) = view.selection else { return };
|
||||
let Some(text) = view.texts.get(&selection.page) else { return };
|
||||
let Some(xf) = view.page_xform(selection.page) else { return };
|
||||
let Some(last) = selection.rects(text).last().copied() else { return };
|
||||
let selected = selection.text(text);
|
||||
if selected.is_empty() {
|
||||
return;
|
||||
}
|
||||
let rect = xf.view_rect(last);
|
||||
if !viewport.intersects(rect) {
|
||||
return;
|
||||
}
|
||||
let x = rect.left().clamp(viewport.left() + 8.0, (viewport.right() - 520.0).max(viewport.left() + 8.0));
|
||||
let y = if rect.bottom() + 48.0 < viewport.bottom() { rect.bottom() + 6.0 } else { (rect.top() - 44.0).max(viewport.top() + 6.0) };
|
||||
let mut chosen = None;
|
||||
egui::Area::new(egui::Id::new(("text-selection-actions", view.id.0))).order(egui::Order::Foreground).fixed_pos(pos2(x, y)).show(ui.ctx(), |ui| {
|
||||
egui::Frame::popup(ui.style()).show(ui, |ui| {
|
||||
ui.horizontal(|ui| {
|
||||
for (label, action) in [
|
||||
(tl!("Add comment"), SelectionAction::Note),
|
||||
(tl!("Highlight"), SelectionAction::Markup(comments::CommentTool::Highlight)),
|
||||
(tl!("Underline"), SelectionAction::Markup(comments::CommentTool::Underline)),
|
||||
(tl!("Strikethrough"), SelectionAction::Markup(comments::CommentTool::StrikeOut)),
|
||||
(tl!("Replace text"), SelectionAction::Replace),
|
||||
] {
|
||||
if ui.add_enabled(can_comment, egui::Button::new(label)).clicked() {
|
||||
chosen = Some(action);
|
||||
}
|
||||
}
|
||||
if ui.button(tl!("Copy")).clicked() {
|
||||
chosen = Some(SelectionAction::Copy);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
let Some(action) = chosen else { return };
|
||||
if let SelectionAction::Copy = action {
|
||||
ui.ctx().copy_text(selected);
|
||||
return;
|
||||
}
|
||||
let Some((page, quads)) = view.selection_quads(info) else { return };
|
||||
let last = quads.last().copied().unwrap_or_default();
|
||||
let at = [last[2].max(last[6]), last[1].max(last[3])];
|
||||
view.clear_selection();
|
||||
match action {
|
||||
SelectionAction::Note | SelectionAction::Replace => {
|
||||
if matches!(action, SelectionAction::Replace) {
|
||||
view.comments.replace = Some(quads);
|
||||
}
|
||||
view.comments.composer = Some(comments::Composer {
|
||||
page,
|
||||
at,
|
||||
kind: if matches!(action, SelectionAction::Replace) { comments::ComposerKind::Replace } else { comments::ComposerKind::Note },
|
||||
text: String::new(),
|
||||
focus: true,
|
||||
});
|
||||
}
|
||||
SelectionAction::Markup(tool) => {
|
||||
// Every markup button carries a markup tool; anything else adds nothing.
|
||||
let Some(kind) = tool.markup() else { return };
|
||||
view.pending_edit = Some(Edit::AddAnnotation(pdfcraft_engine::NewAnnotation {
|
||||
page,
|
||||
shape: pdfcraft_engine::Shape::TextMarkup { kind, quads },
|
||||
style: prefs.style(tool),
|
||||
contents: String::new(),
|
||||
author: prefs.author.clone(),
|
||||
}));
|
||||
}
|
||||
// Copied above.
|
||||
SelectionAction::Copy => {}
|
||||
}
|
||||
}
|
||||
|
||||
/// Run a push button's action (the ones that need no JavaScript engine).
|
||||
fn run_button(app: &mut PdfCraftApp, index: usize, name: &str, action: pdfcraft_engine::form_scripts::ButtonAction) {
|
||||
use pdfcraft_engine::form_scripts::ButtonAction as B;
|
||||
|
|
|
|||
|
|
@ -2274,3 +2274,4 @@ scroll speed Fast سريعة
|
|||
Black and white أبيض وأسود
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… لا يقبل برنامج تشغيل هذه الطابعة إعدادات الطباعة على الوجهين من البرامج الأخرى، لذا يُطبَّق إعداده الخاص. غيّره من خصائص…
|
||||
Tools panel side جانب لوحة الأدوات
|
||||
Add comment إضافة تعليق
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
|
|
@ -2216,3 +2216,4 @@ scroll speed Fast Висока
|
|||
Black and white Черно-бяло
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Драйверът на този принтер не приема настройки за двустранен печат от други програми и прилага собствената си настройка. Променете я от Свойства…
|
||||
Tools panel side Страна на панела с инструменти
|
||||
Add comment Добавяне на коментар
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 8 and column 16.
|
|
|
@ -2330,3 +2330,4 @@ scroll speed Fast Rychlá
|
|||
This field's font can't draw “{c}” ({code}), so PdfCraft shows ? in its place. The value is saved, and other PDF viewers redraw the field from it. Písmo tohoto pole neumí zobrazit „{c}“ ({code}), proto PdfCraft místo něj ukazuje ?. Hodnota se uloží a jiné prohlížeče PDF pole podle ní překreslí.
|
||||
The fonts PdfCraft writes with can't draw “{c}” ({code}), so it shows as ? in every PDF viewer. The text is saved. Písma, kterými PdfCraft píše, neumí zobrazit „{c}“ ({code}), proto se ve všech prohlížečích PDF zobrazí jako ?. Text se uloží.
|
||||
Tools panel side Strana panelu nástrojů
|
||||
Add comment Přidat komentář
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
|
|
@ -2254,3 +2254,4 @@ scroll speed Fast Schnell
|
|||
Black and white Schwarzweiß
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Der Treiber dieses Druckers übernimmt keine Einstellungen für beidseitigen Druck von anderen Programmen, daher gilt seine eigene Einstellung. Ändern unter Eigenschaften…
|
||||
Tools panel side Seite des Werkzeugbereichs
|
||||
Add comment Kommentar hinzufügen
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 51.
|
|
|
@ -2272,3 +2272,4 @@ scroll speed Fast Γρήγορη
|
|||
This field's font can't draw “{c}” ({code}), so PdfCraft shows ? in its place. The value is saved, and other PDF viewers redraw the field from it. Η γραμματοσειρά αυτού του πεδίου δεν μπορεί να σχεδιάσει το «{c}» ({code}), γι' αυτό το PdfCraft δείχνει ? στη θέση του. Η τιμή αποθηκεύεται και άλλα προγράμματα προβολής PDF επανασχεδιάζουν το πεδίο από αυτήν.
|
||||
The fonts PdfCraft writes with can't draw “{c}” ({code}), so it shows as ? in every PDF viewer. The text is saved. Οι γραμματοσειρές με τις οποίες γράφει το PdfCraft δεν μπορούν να σχεδιάσουν το «{c}» ({code}), γι' αυτό εμφανίζεται ως ? σε κάθε πρόγραμμα προβολής PDF. Το κείμενο αποθηκεύεται.
|
||||
Tools panel side Πλευρά πλαισίου εργαλείων
|
||||
Add comment Προσθήκη σχολίου
|
||||
|
|
|
|||
|
Can't render this file because it has a wrong number of fields in line 5.
|
|
|
@ -2304,3 +2304,4 @@ scroll speed Fast Rápida
|
|||
Black and white Blanco y negro
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… El controlador de esta impresora no acepta los ajustes de doble cara de otros programas, así que se aplica su propio ajuste. Cámbielo en Propiedades…
|
||||
Tools panel side Lado del panel de herramientas
|
||||
Add comment Añadir comentario
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 60.
|
|
|
@ -2253,3 +2253,4 @@ scroll speed Fast Rapide
|
|||
Black and white Noir et blanc
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Le pilote de cette imprimante n'accepte pas les réglages recto verso des autres programmes ; son propre réglage s'applique. Modifiez-le dans Propriétés…
|
||||
Tools panel side Côté du panneau Outils
|
||||
Add comment Ajouter un commentaire
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 39.
|
|
|
@ -2252,3 +2252,4 @@ scroll speed Fast Gyors
|
|||
Black and white Fekete-fehér
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… A nyomtató illesztőprogramja nem fogadja el más programoktól a kétoldalas nyomtatás beállítását, ezért a saját beállítása érvényes. Módosítás: Tulajdonságok…
|
||||
Tools panel side Az Eszközök panel oldala
|
||||
Add comment Megjegyzés hozzáadása
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 7 and column 44.
|
|
|
@ -2262,3 +2262,4 @@ scroll speed Fast Veloce
|
|||
Black and white Bianco e nero
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Il driver di questa stampante non accetta le impostazioni fronte-retro da altri programmi, quindi vale la sua impostazione. Modificala in Proprietà…
|
||||
Tools panel side Lato del pannello Strumenti
|
||||
Add comment Aggiungi commento
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
|
|
@ -2253,3 +2253,4 @@ scroll speed Fast 速い
|
|||
Black and white 白黒
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… このプリンターのドライバーは他のプログラムからの両面印刷の設定を受け付けないため、ドライバー自身の設定が使われます。変更先: プロパティ…
|
||||
Tools panel side ツールパネルの位置
|
||||
Add comment コメントを追加
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
|
|
@ -2254,3 +2254,4 @@ scroll speed Fast Жылдам
|
|||
This field's font can't draw “{c}” ({code}), so PdfCraft shows ? in its place. The value is saved, and other PDF viewers redraw the field from it. Бұл өрістің қаріпі «{c}» ({code}) таңбасын сала алмайды, сондықтан PdfCraft оның орнына ? көрсетеді. Мән сақталады, ал басқа PDF қарау құралдары өрісті соған қарап қайта салады.
|
||||
The fonts PdfCraft writes with can't draw “{c}” ({code}), so it shows as ? in every PDF viewer. The text is saved. PdfCraft жазатын қаріптер «{c}» ({code}) таңбасын сала алмайды, сондықтан ол барлық PDF қарау құралдарында ? болып көрінеді. Мәтін сақталады.
|
||||
Tools panel side Құралдар панелінің жағы
|
||||
Add comment Түсініктеме қосу
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 813 and column 12.
|
|
|
@ -2236,3 +2236,4 @@ scroll speed Fast Szybka
|
|||
Black and white Czarno-biały
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Sterownik tej drukarki nie przyjmuje ustawień druku dwustronnego z innych programów, więc obowiązuje jego własne ustawienie. Zmień je w oknie Właściwości…
|
||||
Tools panel side Strona panelu narzędzi
|
||||
Add comment Dodaj komentarz
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
|
|
@ -2267,3 +2267,4 @@ scroll speed Fast Rápida
|
|||
Black and white Preto e branco
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… O driver desta impressora não aceita configurações de frente e verso de outros programas, então vale a configuração dele. Altere em Propriedades…
|
||||
Tools panel side Lado do painel Ferramentas
|
||||
Add comment Adicionar comentário
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 9 and column 16.
|
|
|
@ -2166,3 +2166,4 @@ scroll speed Fast Высокая
|
|||
Black and white Чёрно-белый
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Драйвер этого принтера не принимает настройки двусторонней печати от других программ, поэтому действует его собственная настройка. Измените её в окне Свойства…
|
||||
Tools panel side Сторона панели инструментов
|
||||
Add comment Добавить комментарий
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 9 and column 16.
|
|
|
@ -2261,3 +2261,4 @@ scroll speed Fast Hitro
|
|||
This field's font can't draw “{c}” ({code}), so PdfCraft shows ? in its place. The value is saved, and other PDF viewers redraw the field from it. Pisava tega polja ne more prikazati »{c}« ({code}), zato PdfCraft namesto njega prikaže ?. Vrednost se shrani, drugi pregledovalniki PDF pa polje znova narišejo iz nje.
|
||||
The fonts PdfCraft writes with can't draw “{c}” ({code}), so it shows as ? in every PDF viewer. The text is saved. Pisave, s katerimi piše PdfCraft, ne morejo prikazati »{c}« ({code}), zato se v vseh pregledovalnikih PDF prikaže kot ?. Besedilo se shrani.
|
||||
Tools panel side Stran podokna z orodji
|
||||
Add comment Dodaj komentar
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 9 and column 16.
|
|
|
@ -2169,3 +2169,4 @@ scroll speed Fast వేగంగా
|
|||
Greyscale గ్రేస్కేల్
|
||||
Black and white నలుపు తెలుపు
|
||||
Tools panel side టూల్స్ ప్యానెల్ వైపు
|
||||
Add comment వ్యాఖ్యను జోడించు
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 13 and column 16.
|
|
|
@ -2252,3 +2252,4 @@ scroll speed Fast Hızlı
|
|||
This field's font can't draw “{c}” ({code}), so PdfCraft shows ? in its place. The value is saved, and other PDF viewers redraw the field from it. Bu alanın yazı tipi “{c}” ({code}) karakterini çizemiyor, bu yüzden PdfCraft yerine ? gösteriyor. Değer kaydedilir ve diğer PDF görüntüleyiciler alanı ondan yeniden çizer.
|
||||
The fonts PdfCraft writes with can't draw “{c}” ({code}), so it shows as ? in every PDF viewer. The text is saved. PdfCraft'ın yazdığı yazı tipleri “{c}” ({code}) karakterini çizemiyor, bu yüzden her PDF görüntüleyicide ? olarak görünür. Metin kaydedilir.
|
||||
Tools panel side Araçlar panelinin yeri
|
||||
Add comment Yorum ekle
|
||||
|
|
|
|||
|
Can't render this file because it has a wrong number of fields in line 7.
|
|
|
@ -2275,3 +2275,4 @@ scroll speed Fast Швидка
|
|||
Black and white Чорно-білий
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… Драйвер цього принтера не приймає налаштування двобічного друку від інших програм, тому діє його власне налаштування. Змініть його у вікні Властивості…
|
||||
Tools panel side Бік панелі інструментів
|
||||
Add comment Додати коментар
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 6 and column 47.
|
|
|
@ -2217,3 +2217,4 @@ scroll speed Fast 快
|
|||
Black and white 黑白
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… 此打印机的驱动程序不接受其他程序的双面打印设置,因此使用其自身设置。更改位置:属性…
|
||||
Tools panel side 工具面板位置
|
||||
Add comment 添加注释
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 9 and column 16.
|
|
|
@ -2130,3 +2130,4 @@ scroll speed Fast 快
|
|||
Black and white 黑白
|
||||
This printer's driver doesn't take two-sided settings from other programs, so its own setting applies. Change it in Properties… 此印表機的驅動程式不接受其他程式的雙面列印設定,因此使用其自身設定。變更位置:屬性…
|
||||
Tools panel side 工具面板位置
|
||||
Add comment 新增註解
|
||||
|
|
|
|||
|
Can't render this file because it contains an unexpected character in line 9 and column 16.
|
|
|
@ -151,6 +151,44 @@ fn a_selection_made_first_is_marked_when_a_tool_is_picked() {
|
|||
assert!(h.state().views[0].selected_text().is_none(), "the selection is consumed");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn selected_text_shows_actions_and_underlines_without_changing_tools() {
|
||||
let mut h = harness(|_| {});
|
||||
h.state_mut().views[0].select_text(0, 4, 8);
|
||||
h.run_steps(3);
|
||||
h.get_by_label("Add comment");
|
||||
h.get_by_label("Replace text");
|
||||
h.get_by_label("Underline").click();
|
||||
h.run_steps(3);
|
||||
let c = comments(&h);
|
||||
assert_eq!(c.len(), 1);
|
||||
assert_eq!(c[0].subtype, "Underline");
|
||||
assert!(h.state().views[0].selected_text().is_none());
|
||||
assert_eq!(h.state().quick_tool, QuickTool::Select);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn selected_text_replace_action_opens_replacement_composer() {
|
||||
let mut h = harness(|_| {});
|
||||
h.state_mut().views[0].select_text(0, 4, 8);
|
||||
h.run_steps(3);
|
||||
h.get_by_label("Replace text").click();
|
||||
h.run_steps(2);
|
||||
h.get_by_label("Replacement text");
|
||||
assert!(h.state().views[0].selected_text().is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn selected_text_comment_action_opens_note_composer() {
|
||||
let mut h = harness(|_| {});
|
||||
h.state_mut().views[0].select_text(0, 4, 8);
|
||||
h.run_steps(3);
|
||||
h.get_by_label("Add comment").click();
|
||||
h.run_steps(2);
|
||||
assert!(matches!(h.state().views[0].comments.composer.as_ref().map(|c| &c.kind), Some(pdfcraft_ui_egui::comments::ComposerKind::Note)));
|
||||
assert!(h.state().views[0].selected_text().is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn shapes_and_ink_are_drawn_by_dragging() {
|
||||
let mut h = harness(|app| app.set_option("quick", "square").unwrap());
|
||||
|
|
|
|||
|
|
@ -1490,8 +1490,8 @@ milestone = "M3"
|
|||
status = "shipped"
|
||||
commands = []
|
||||
tools = []
|
||||
evidence = ["crates/ui-egui/tests/ui.rs::drag_selects_text_and_copy_returns_it", "crates/ui-egui/tests/ui.rs::selection_works_in_every_view_rotation", "crates/ui-egui/tests/ui_group/text_select.rs::quick_clicks_select_a_word_then_the_line_then_the_page", "crates/ui-egui/tests/ui_group/text_select.rs::quick_clicks_with_the_highlighter_mark_only_the_word", "crates/ui-egui/tests/ui_group/text_select.rs::shift_click_extends_the_selection_from_its_anchor"]
|
||||
notes = "Drag to select; ⇧-click extends the selection to the click, keeping its anchor (same page only); with the Select tool, quick clicks select a word (two), the line (three) or all the text on the page (four). The markup and Redact tools mark a double-clicked word and stop there. Missing: selection across pages (dragging or ⇧-clicking onto another page), paragraph selection, and ⌘A across the whole document (it selects the current page)."
|
||||
evidence = ["crates/ui-egui/tests/ui.rs::drag_selects_text_and_copy_returns_it", "crates/ui-egui/tests/ui.rs::selection_works_in_every_view_rotation", "crates/ui-egui/tests/ui_group/text_select.rs::quick_clicks_select_a_word_then_the_line_then_the_page", "crates/ui-egui/tests/ui_group/text_select.rs::quick_clicks_with_the_highlighter_mark_only_the_word", "crates/ui-egui/tests/ui_group/text_select.rs::shift_click_extends_the_selection_from_its_anchor", "crates/ui-egui/tests/comments.rs::selected_text_shows_actions_and_underlines_without_changing_tools", "crates/ui-egui/tests/comments.rs::selected_text_replace_action_opens_replacement_composer", "crates/ui-egui/tests/comments.rs::selected_text_comment_action_opens_note_composer"]
|
||||
notes = "Drag to select; ⇧-click extends the selection to the click, keeping its anchor (same page only); with the Select tool, quick clicks select a word (two), the line (three) or all the text on the page (four). A floating action bar offers comment, highlight, underline, strikethrough, replace text and copy after selection. The markup and Redact tools mark a double-clicked word and stop there. Missing: selection across pages (dragging or ⇧-clicking onto another page), paragraph selection, and ⌘A across the whole document (it selects the current page). Acrobat's other selection context actions such as bookmark, link and export selection remain outside this bar."
|
||||
|
||||
[[feature]]
|
||||
id = "view.column-select"
|
||||
|
|
|
|||
Loading…
Reference in New Issue