Skip to content

Commit

Permalink
Fix display of QR code on Mono
Browse files Browse the repository at this point in the history
  • Loading branch information
Rookiestyle committed Nov 1, 2020
1 parent d176066 commit 3822ea0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/KeePassOTPExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ private void OnOTPQRCode(object sender, EventArgs e)
f.MinimizeBox = false;
f.MaximizeBox = false;
PictureBox pb = new PictureBox();
pb.Size = new Size(bmp.Width, bmp.Height);
pb.Location = new Point(0, 0);
pb.Image = new Bitmap(bmp, bmp.Size); //Assigning bmp directly did not work in my Ubuntu VM...
pb.ClientSize = pb.Image.Size;
f.ClientSize = pb.Size;
pb.Image = bmp;
f.Controls.Add(pb);
if (!string.IsNullOrEmpty(otp.Issuer) && (otp.Issuer != PluginTranslate.PluginName))
{
Expand Down Expand Up @@ -281,8 +281,9 @@ private void OnOTPQRCode(object sender, EventArgs e)
f.ShowDialog(KeePass.UI.GlobalWindowManager.TopWindow);
pb.Image.Dispose();
f.Dispose();
bmp.Dispose();
}
catch { }
catch { };
}

private void OnOTPAutotype(object sender, EventArgs e)
Expand Down
4 changes: 2 additions & 2 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.19")]
[assembly: AssemblyFileVersion("0.19")]
[assembly: AssemblyVersion("0.19.1")]
[assembly: AssemblyFileVersion("0.19.1")]
2 changes: 1 addition & 1 deletion version.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:
KeePassOTP:0.19
KeePassOTP:0.19.1
KeePassOTP!de:11
KeePassOTP!fr:3
:

0 comments on commit 3822ea0

Please sign in to comment.