[GUI] Improve lzma progress report

This commit is contained in:
VaDiM
2026-03-02 17:25:34 +03:00
parent 0a381aff55
commit 094f1a4f9d
2 changed files with 8 additions and 3 deletions
+6 -2
View File
@@ -1560,9 +1560,11 @@ namespace AssetStudioGUI
{
BeginInvoke(new Action(() =>
{
progressBar1.Refresh();
if (value == 0)
return;
using (var graphics = progressBar1.CreateGraphics())
{
progressBar1.Refresh();
var rect = new Rectangle(0, 0, progressBar1.Width, progressBar1.Height);
graphics.DrawString(str, progressBarTextFont, progressBarTextBrush, rect, progressBarTextFormat);
}
@@ -1570,9 +1572,11 @@ namespace AssetStudioGUI
}
else
{
progressBar1.Refresh();
if (value == 0)
return;
using (var graphics = progressBar1.CreateGraphics())
{
progressBar1.Refresh();
var rect = new Rectangle(0, 0, progressBar1.Width, progressBar1.Height);
graphics.DrawString(str, progressBarTextFont, progressBarTextBrush, rect, progressBarTextFormat);
}