|
| 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 | + |
0 commit comments