From 8543d2d61fbafde6222e9b95f9604b41570db477 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Wed, 20 Jul 2022 16:26:08 +0800 Subject: Switch to `qrcode` lib --- src/consts.rs | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/consts.rs (limited to 'src/consts.rs') diff --git a/src/consts.rs b/src/consts.rs new file mode 100644 index 0000000..07f47b0 --- /dev/null +++ b/src/consts.rs @@ -0,0 +1,4 @@ +use qrcode::EcLevel; + +/// The error correction level to use for all QR code generation. +pub const QR_EC_LEVEL: EcLevel = EcLevel::M; -- cgit v1.2.3 From ef3ec4039e220d3dc4a83ac267101c4dc45dace8 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Tue, 26 Jul 2022 13:10:21 +0800 Subject: Use low EC level for QR code --- src/consts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/consts.rs') diff --git a/src/consts.rs b/src/consts.rs index 07f47b0..f10570a 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -1,4 +1,4 @@ use qrcode::EcLevel; /// The error correction level to use for all QR code generation. -pub const QR_EC_LEVEL: EcLevel = EcLevel::M; +pub const QR_EC_LEVEL: EcLevel = EcLevel::L; -- cgit v1.2.3 From aa2dda7885a83354d1519eef62397b90189a9802 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Thu, 1 Sep 2022 20:20:27 +0800 Subject: Switch to `fast_qr` crate --- src/consts.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/consts.rs') diff --git a/src/consts.rs b/src/consts.rs index f10570a..1a105f7 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -1,4 +1,4 @@ -use qrcode::EcLevel; +use fast_qr::ECL; /// The error correction level to use for all QR code generation. -pub const QR_EC_LEVEL: EcLevel = EcLevel::L; +pub const QR_EC_LEVEL: ECL = ECL::L; -- cgit v1.2.3 From 044f30c550888429cf8a9d39ef1a282ff3385e09 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Thu, 1 Sep 2022 21:10:30 +0800 Subject: Move QR margin size into `consts` --- src/consts.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/consts.rs') diff --git a/src/consts.rs b/src/consts.rs index 1a105f7..d864683 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -2,3 +2,6 @@ use fast_qr::ECL; /// The error correction level to use for all QR code generation. pub const QR_EC_LEVEL: ECL = ECL::L; + +/// The margin size for the SVG QR code on the webpage. +pub const SVG_QR_MARGIN: usize = 1; -- cgit v1.2.3