mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-04 12:14:45 +13:00
Use previous thumbnail resizing method
This commit is contained in:
parent
0d6ffbce79
commit
d592b5f390
2 changed files with 8 additions and 7 deletions
2
ShareX/Controls/TaskPanel.Designer.cs
generated
2
ShareX/Controls/TaskPanel.Designer.cs
generated
|
@ -83,7 +83,7 @@ private void InitializeComponent()
|
||||||
//
|
//
|
||||||
// pbThumbnail
|
// pbThumbnail
|
||||||
//
|
//
|
||||||
this.pbThumbnail.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(40)))), ((int)(((byte)(48)))));
|
this.pbThumbnail.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.pbThumbnail.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.pbThumbnail.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.pbThumbnail.Location = new System.Drawing.Point(5, 5);
|
this.pbThumbnail.Location = new System.Drawing.Point(5, 5);
|
||||||
this.pbThumbnail.Name = "pbThumbnail";
|
this.pbThumbnail.Name = "pbThumbnail";
|
||||||
|
|
|
@ -175,7 +175,8 @@ public void UpdateThumbnail()
|
||||||
{
|
{
|
||||||
if (img != null)
|
if (img != null)
|
||||||
{
|
{
|
||||||
ThumbnailImage = ImageHelpers.CreateThumbnail(img, ThumbnailSize.Width, ThumbnailSize.Height);
|
//ThumbnailImage = ImageHelpers.CreateThumbnail(img, ThumbnailSize.Width, ThumbnailSize.Height);
|
||||||
|
ThumbnailImage = ImageHelpers.ResizeImage(img, ThumbnailSize, false);
|
||||||
pbThumbnail.Image = ThumbnailImage;
|
pbThumbnail.Image = ThumbnailImage;
|
||||||
ThumbnailSourceFilePath = filePath;
|
ThumbnailSourceFilePath = filePath;
|
||||||
pbThumbnail.Cursor = Cursors.Hand;
|
pbThumbnail.Cursor = Cursors.Hand;
|
||||||
|
@ -189,6 +190,11 @@ public void UpdateThumbnail()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void UpdateProgress()
|
||||||
|
{
|
||||||
|
Progress = (int)Task.Info.Progress.Percentage;
|
||||||
|
}
|
||||||
|
|
||||||
public void ClearThumbnail()
|
public void ClearThumbnail()
|
||||||
{
|
{
|
||||||
pbThumbnail.Image = null;
|
pbThumbnail.Image = null;
|
||||||
|
@ -202,11 +208,6 @@ public void ClearThumbnail()
|
||||||
ThumbnailSourceFilePath = null;
|
ThumbnailSourceFilePath = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateProgress()
|
|
||||||
{
|
|
||||||
Progress = (int)Task.Info.Progress.Percentage;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void PbThumbnail_MouseDown(object sender, MouseEventArgs e)
|
private void PbThumbnail_MouseDown(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Button == MouseButtons.Left && !string.IsNullOrEmpty(ThumbnailSourceFilePath))
|
if (e.Button == MouseButtons.Left && !string.IsNullOrEmpty(ThumbnailSourceFilePath))
|
||||||
|
|
Loading…
Reference in a new issue