mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-23 21:47:14 -04:00
Simplify arithmetic
This commit is contained in:
parent
bd77f1e84f
commit
87b8a8d7c7
1 changed files with 1 additions and 3 deletions
|
@ -27,9 +27,7 @@ namespace Jellyfin.Drawing.Skia
|
|||
paint.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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue