diff --git a/qtc-net-client-2/Forms/Profile.Designer.cs b/qtc-net-client-2/Forms/Profile.Designer.cs index f98fc06..2440757 100644 --- a/qtc-net-client-2/Forms/Profile.Designer.cs +++ b/qtc-net-client-2/Forms/Profile.Designer.cs @@ -51,12 +51,11 @@ // // pbUserPfp // - pbUserPfp.BorderStyle = BorderStyle.FixedSingle; pbUserPfp.Image = Properties.Resources.DefaultPfp; - pbUserPfp.Location = new Point(9, 5); + pbUserPfp.Location = new Point(13, 11); pbUserPfp.Name = "pbUserPfp"; - pbUserPfp.Size = new Size(138, 139); - pbUserPfp.SizeMode = PictureBoxSizeMode.StretchImage; + pbUserPfp.Size = new Size(128, 128); + pbUserPfp.SizeMode = PictureBoxSizeMode.Zoom; pbUserPfp.TabIndex = 2; pbUserPfp.TabStop = false; // diff --git a/qtc-net-client-2/Forms/Profile.cs b/qtc-net-client-2/Forms/Profile.cs index b95baa7..9e7994b 100644 --- a/qtc-net-client-2/Forms/Profile.cs +++ b/qtc-net-client-2/Forms/Profile.cs @@ -46,6 +46,9 @@ namespace qtc_net_client_2.Forms lblCurrencyAmount.Text = _userInformationDto.CurrencyAmount.ToString("N0"); rtxtBio.Text = _userInformationDto.Bio; + pbUserPfp.Location = new(13, 11); + pbUserPfp.Size = new(128, 128); + if (pfpRes != null && pfpRes.Success && pfpRes.Data != null) { using (var ms = new MemoryStream(pfpRes.Data)) @@ -242,17 +245,19 @@ namespace qtc_net_client_2.Forms private void CombineProfileImageWithCosmetic(Image pfp, Bitmap cosmetic) { cosmetic.MakeTransparent(); - Bitmap combined = new Bitmap(pbUserPfp.Width, pbUserPfp.Height); + Bitmap combined = new Bitmap(139, 138); using (Graphics g = Graphics.FromImage(combined)) { g.Clear(Color.Transparent); g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver; - g.DrawImage(pfp, 0, 0, pbUserPfp.Width, pbUserPfp.Height); - g.DrawImage(cosmetic, 0, 0, pbUserPfp.Width, pbUserPfp.Height); + g.DrawImage(pfp, 4, 6, 128, 128); + g.DrawImage(cosmetic, 0, 0, 139, 138); } + pbUserPfp.Location = new(9, 5); + pbUserPfp.Size = new(139, 138); pbUserPfp.Image = combined; } }