aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs25
1 files changed, 10 insertions, 15 deletions
diff --git a/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs b/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs
index 11d812a43..695c6390a 100644
--- a/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs
+++ b/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs
@@ -1,16 +1,11 @@
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Drawing;
namespace MediaBrowser.Server.Implementations.Drawing
{
public class UnplayedCountIndicator
{
- private const int IndicatorHeight = 50;
- public const int IndicatorWidth = 50;
+ private const int IndicatorHeight = 41;
+ public const int IndicatorWidth = 41;
private const int OffsetFromTopRightCorner = 10;
public void DrawUnplayedCountIndicator(Graphics graphics, Size imageSize, int count)
@@ -23,13 +18,13 @@ namespace MediaBrowser.Server.Implementations.Drawing
var text = count.ToString();
- x = imageSize.Width - 50 - OffsetFromTopRightCorner;
- var y = OffsetFromTopRightCorner + 7;
- var fontSize = 30;
+ x = imageSize.Width - IndicatorWidth - OffsetFromTopRightCorner;
+ var y = OffsetFromTopRightCorner + 6;
+ var fontSize = 24;
if (text.Length == 1)
{
- x += 11;
+ x += 10;
}
else if (text.Length == 2)
{
@@ -37,9 +32,9 @@ namespace MediaBrowser.Server.Implementations.Drawing
}
else if (text.Length == 3)
{
- //x += 1;
- y += 3;
- fontSize = 24;
+ x += 1;
+ y += 1;
+ fontSize = 20;
}
using (var font = new Font("Sans-Serif", fontSize, FontStyle.Regular, GraphicsUnit.Pixel))