From cf02c1395271fd6c127fa2ed6557b3aeb279e5fe Mon Sep 17 00:00:00 2001
From: ouwou <26526779+ouwou@users.noreply.github.com>
Date: Mon, 3 Jul 2023 20:01:53 -0400
Subject: use ppm instead of svg for generating qr pixbuf
---
src/remoteauth/remoteauthdialog.cpp | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
(limited to 'src')
diff --git a/src/remoteauth/remoteauthdialog.cpp b/src/remoteauth/remoteauthdialog.cpp
index c59f0ed..5ba91ae 100644
--- a/src/remoteauth/remoteauthdialog.cpp
+++ b/src/remoteauth/remoteauthdialog.cpp
@@ -65,29 +65,26 @@ void RemoteAuthDialog::OnFingerprint(const std::string &fingerprint) {
int size = qr.getSize();
const int border = 4;
+ const auto module_set = "0 0 0";
+ const auto module_clr = "255 255 255";
+
std::ostringstream sb;
- sb << "\n";
- sb << "\n";
- sb << "\n";
- const auto svg = sb.str();
+ const auto img = sb.str();
auto loader = Gdk::PixbufLoader::create();
- loader->write(reinterpret_cast(svg.data()), svg.size());
+ loader->write(reinterpret_cast(img.data()), img.size());
loader->close();
const auto pb = loader->get_pixbuf()->scale_simple(256, 256, Gdk::INTERP_NEAREST);
--
cgit v1.2.3