We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10062da commit 37f1555Copy full SHA for 37f1555
DoomLauncher/Controls/CProgressBar.cs
@@ -13,12 +13,14 @@ public CProgressBar()
13
protected override void OnPaint(PaintEventArgs e)
14
{
15
Rectangle rect = e.ClipRectangle;
16
-
17
DpiScale dpiScale = new DpiScale(e.Graphics);
18
int padX = dpiScale.ScaleIntX(2);
19
int padY = dpiScale.ScaleIntY(2);
20
21
- rect.Width = (int)(rect.Width * ((double)Value / Maximum)) - (padX*2);
+ if (Maximum != 0)
+ rect.Width = (int)(rect.Width * ((double)Value / Maximum));
22
+ rect.Width -= (padX * 2);
23
+
24
if (ProgressBarRenderer.IsSupported)
25
ProgressBarRenderer.DrawHorizontalBar(e.Graphics, e.ClipRectangle);
26
rect.Height -= padY * 2;
0 commit comments