From e80cbe5b64fa85a814e8e3009c28b1853dc23988 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 1 Jan 2014 22:53:27 -0500 Subject: reduce image indicator sizes --- .../Drawing/PlayedIndicatorDrawer.cs | 8 +++---- .../Drawing/UnplayedCountIndicator.cs | 25 +++++++++------------- 2 files changed, 14 insertions(+), 19 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Drawing') diff --git a/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs b/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs index 7be1873966..fa4231612b 100644 --- a/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs +++ b/MediaBrowser.Server.Implementations/Drawing/PlayedIndicatorDrawer.cs @@ -4,9 +4,9 @@ namespace MediaBrowser.Server.Implementations.Drawing { public class PlayedIndicatorDrawer { - private const int IndicatorHeight = 50; - public const int IndicatorWidth = 50; - private const int FontSize = 50; + private const int IndicatorHeight = 40; + public const int IndicatorWidth = 40; + private const int FontSize = 40; private const int OffsetFromTopRightCorner = 10; public void DrawPlayedIndicator(Graphics graphics, Size imageSize) @@ -17,7 +17,7 @@ namespace MediaBrowser.Server.Implementations.Drawing { graphics.FillEllipse(backdroundBrush, x, OffsetFromTopRightCorner, IndicatorWidth, IndicatorHeight); - x = imageSize.Width - 55 - OffsetFromTopRightCorner; + x = imageSize.Width - 45 - OffsetFromTopRightCorner; using (var font = new Font("Webdings", FontSize, FontStyle.Regular, GraphicsUnit.Pixel)) { diff --git a/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs b/MediaBrowser.Server.Implementations/Drawing/UnplayedCountIndicator.cs index 11d812a431..695c6390a7 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)) -- cgit v1.2.3