Skip to content

Commit e55b0af

Browse files
committed
Improve graphical signature preview
- Make the graphical signature smaller because it is too big Signed-off-by: Luca Magrone <luca@magrone.cc>
1 parent a1686aa commit e55b0af

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 113b02c0e5a4d889166174aaa1a8c58fc0940f65 Mon Sep 17 00:00:00 2001
2+
From: Luca Magrone <luca@magrone.cc>
3+
Date: Sat, 19 Oct 2024 11:23:42 +0200
4+
Subject: [PATCH] CIEID: PADES: Improve graphical signature preview and make a
5+
smaller graphical signature
6+
7+
Make the background of the signature transparent.
8+
Shrink the signature.
9+
Make the border dashed.
10+
11+
Signed-off-by: Luca Magrone <luca@magrone.cc>
12+
---
13+
CIEID/src/it/ipzs/cieid/Firma/MoveablePicture.java | 8 ++++----
14+
1 file changed, 4 insertions(+), 4 deletions(-)
15+
16+
diff --git a/CIEID/src/it/ipzs/cieid/Firma/MoveablePicture.java b/CIEID/src/it/ipzs/cieid/Firma/MoveablePicture.java
17+
index 302c75a..e05fdcd 100644
18+
--- a/CIEID/src/it/ipzs/cieid/Firma/MoveablePicture.java
19+
+++ b/CIEID/src/it/ipzs/cieid/Firma/MoveablePicture.java
20+
@@ -21,13 +21,13 @@ public class MoveablePicture extends JPanel implements MouseListener, MouseMotio
21+
22+
public MoveablePicture(String signFilePath) {
23+
// TODO Auto-generated constructor stub
24+
- this.setSize(90, 25);
25+
- this.setBackground(Color.white);
26+
- this.setBorder(BorderFactory.createLineBorder(Color.black));
27+
+ this.setSize(50, 25);
28+
+ this.setBackground(new Color(255, 255, 255, 0));
29+
+ this.setBorder(BorderFactory.createDashedBorder(Color.black));
30+
try {
31+
Image img;
32+
img = ImageIO.read(new File(signFilePath));
33+
- JLabel imgLabel = new JLabel(new ImageIcon(img.getScaledInstance(this.getWidth()-5, this.getHeight()-10, Image.SCALE_SMOOTH)));
34+
+ JLabel imgLabel = new JLabel(new ImageIcon(img.getScaledInstance(this.getWidth(), this.getHeight(), Image.SCALE_SMOOTH)));
35+
this.add(imgLabel);
36+
} catch (IOException e) {
37+
// TODO Auto-generated catch block
38+
--
39+
2.43.5
40+

cie-middleware.spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Patch11: cie-middleware-fix-pkcs11-cant-lock.patch
3131
Patch12: cie-middleware-fix-chromium-buffer-overflow.patch
3232
Patch13: cie-middleware-override-tutorial.patch
3333
Patch14: cie-middleware-reduce-verbosity.patch
34+
Patch15: cie-middleware-improve-graphical-signature.patch
3435

3536
%if 0%{?fedora} < 40 || (0%{?rhel} && 0%{?rhel} < 10)
3637
BuildRequires: maven-local-openjdk11

0 commit comments

Comments
 (0)