Positioning And Size Fixes
This commit is contained in:
parent
003d01fe4e
commit
868f6fa067
7
qtc-net-client-2/Forms/Profile.Designer.cs
generated
7
qtc-net-client-2/Forms/Profile.Designer.cs
generated
@ -51,12 +51,11 @@
|
|||||||
//
|
//
|
||||||
// pbUserPfp
|
// pbUserPfp
|
||||||
//
|
//
|
||||||
pbUserPfp.BorderStyle = BorderStyle.FixedSingle;
|
|
||||||
pbUserPfp.Image = Properties.Resources.DefaultPfp;
|
pbUserPfp.Image = Properties.Resources.DefaultPfp;
|
||||||
pbUserPfp.Location = new Point(9, 5);
|
pbUserPfp.Location = new Point(13, 11);
|
||||||
pbUserPfp.Name = "pbUserPfp";
|
pbUserPfp.Name = "pbUserPfp";
|
||||||
pbUserPfp.Size = new Size(138, 139);
|
pbUserPfp.Size = new Size(128, 128);
|
||||||
pbUserPfp.SizeMode = PictureBoxSizeMode.StretchImage;
|
pbUserPfp.SizeMode = PictureBoxSizeMode.Zoom;
|
||||||
pbUserPfp.TabIndex = 2;
|
pbUserPfp.TabIndex = 2;
|
||||||
pbUserPfp.TabStop = false;
|
pbUserPfp.TabStop = false;
|
||||||
//
|
//
|
||||||
|
@ -46,6 +46,9 @@ namespace qtc_net_client_2.Forms
|
|||||||
lblCurrencyAmount.Text = _userInformationDto.CurrencyAmount.ToString("N0");
|
lblCurrencyAmount.Text = _userInformationDto.CurrencyAmount.ToString("N0");
|
||||||
rtxtBio.Text = _userInformationDto.Bio;
|
rtxtBio.Text = _userInformationDto.Bio;
|
||||||
|
|
||||||
|
pbUserPfp.Location = new(13, 11);
|
||||||
|
pbUserPfp.Size = new(128, 128);
|
||||||
|
|
||||||
if (pfpRes != null && pfpRes.Success && pfpRes.Data != null)
|
if (pfpRes != null && pfpRes.Success && pfpRes.Data != null)
|
||||||
{
|
{
|
||||||
using (var ms = new MemoryStream(pfpRes.Data))
|
using (var ms = new MemoryStream(pfpRes.Data))
|
||||||
@ -242,17 +245,19 @@ namespace qtc_net_client_2.Forms
|
|||||||
private void CombineProfileImageWithCosmetic(Image pfp, Bitmap cosmetic)
|
private void CombineProfileImageWithCosmetic(Image pfp, Bitmap cosmetic)
|
||||||
{
|
{
|
||||||
cosmetic.MakeTransparent();
|
cosmetic.MakeTransparent();
|
||||||
Bitmap combined = new Bitmap(pbUserPfp.Width, pbUserPfp.Height);
|
Bitmap combined = new Bitmap(139, 138);
|
||||||
|
|
||||||
using (Graphics g = Graphics.FromImage(combined))
|
using (Graphics g = Graphics.FromImage(combined))
|
||||||
{
|
{
|
||||||
g.Clear(Color.Transparent);
|
g.Clear(Color.Transparent);
|
||||||
g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver;
|
g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver;
|
||||||
|
|
||||||
g.DrawImage(pfp, 0, 0, pbUserPfp.Width, pbUserPfp.Height);
|
g.DrawImage(pfp, 4, 6, 128, 128);
|
||||||
g.DrawImage(cosmetic, 0, 0, pbUserPfp.Width, pbUserPfp.Height);
|
g.DrawImage(cosmetic, 0, 0, 139, 138);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pbUserPfp.Location = new(9, 5);
|
||||||
|
pbUserPfp.Size = new(139, 138);
|
||||||
pbUserPfp.Image = combined;
|
pbUserPfp.Image = combined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user