Open xxxserxxx opened 1 year ago
Thanks for this! Overall the code looks good.
It doesn't look like the QR code is being hidden after the transfer has begun. We should use the same logic used for showing and hiding the text transfer code.
The QR code ends up looking blurry on my phone (it still scans). I'm not sure what the cause of that is but it seems like that should be fixable. I think we should also make the image larger. Either some reasonable minimal width or size it based on the size of the viewport.
I am very unfamiliar with the gioui library, and it's not a trivial library to get into, so I was trying to make the patch as small as possible.
I see what you mean about hiding the QR. Noted.
There's a scaling variable in the QR library (used at ui/ui.go#251
), but it doesn't actually scale the pixels; it just makes the image bounds larger. I'm either missing something in the lib API, or we have to manually scale the image.
I see a fuzzy QR as well on the desktop. The only thing I can think that would cause blurriness is if something in the image processing was resulting in a lossy image. It might be worth running a test on the qr library by itself and see how the images it produces look without being filtered through gioui.
I'm going to be unable to work on this for another week or so, but I'll poke around with it when I get back.
This implements #28. I've done no testing on mobile, but:
The QR codes are small, but they scan, and it works as-is. I don't have the Android SDK currently installed on my laptop because it's enormous.
Anyhoo, you said you'd be happy to have a patch for #28, so here it is.