The Free Software Media System - Server Backend & API
Simplify arithmetic
Patrick Barron87b8a8d7c76e
diff --git a/Jellyfin.Drawing.Skia/PercentPlayedDrawer.cs b/Jellyfin.Drawing.Skia/PercentPlayedDrawer.csindex ae9d4e0c49..6136a2ff98 100644--- a/Jellyfin.Drawing.Skia/PercentPlayedDrawer.cs+++ b/Jellyfin.Drawing.Skia/PercentPlayedDrawer.cs@@ -27,9 +27,7 @@ namespace Jellyfin.Drawing.Skiapaint.Style = SKPaintStyle.Fill;canvas.DrawRect(SKRect.Create(0, (float)endY - IndicatorHeight, endX, endY), paint);- double foregroundWidth = endX;- foregroundWidth *= percent;- foregroundWidth /= 100;+ double foregroundWidth = (endX * percent) / 100;paint.Color = SKColor.Parse("#FF00A4DC");canvas.DrawRect(SKRect.Create(0, (float)endY - IndicatorHeight, Convert.ToInt32(foregroundWidth), endY), paint);