papers/papers-47.0-too-small-rect.patch
2025-10-21 17:13:06 +02:00

45 lines
1.4 KiB
Diff

From fb19401c6024d53929021bd1ad54bd1c0dd850ab Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Thu, 9 Oct 2025 12:19:36 +0200
Subject: [PATCH] shell: Fix signing when the rectangle is too small
Allow user to use the small rectangle for signature instead
of starting over.
---
shell/src/document_view/signals.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/shell/src/document_view/signals.rs b/shell/src/document_view/signals.rs
index 2f3cc6601..f9b5b686d 100644
--- a/shell/src/document_view/signals.rs
+++ b/shell/src/document_view/signals.rs
@@ -775,7 +775,7 @@ impl imp::PpsDocumentView {
#[template_callback]
fn signature_rect_too_small(&self, response: &str) {
if response == "sign" {
- self.create_certificate_selection();
+ self.certificate_save_as_dialog();
return;
}
@@ -837,6 +837,7 @@ impl imp::PpsDocumentView {
self.signature_page.set(page);
self.signature_bounding_box.replace(Some(*rect));
+ signature.set_rect(rect);
// Calculate font size for main (right) signature text
let Some(font_size) = Self::calculate_font_size(
@@ -862,8 +863,6 @@ impl imp::PpsDocumentView {
signature.set_left_font_size(font_size as i32);
- signature.set_rect(rect);
-
self.certificate_save_as_dialog();
}
}
--
2.51.0