[longomatch] Move the events count to the beginning of the cell area



commit ab47f06809077452d9b769a7c9db9c4a21f9e2d7
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Dec 24 12:45:05 2014 +0100

    Move the events count to the beginning of the cell area

 LongoMatch.Core/StyleConf.cs                |    2 ++
 LongoMatch.Drawing/PlayslistCellRenderer.cs |   11 +++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/LongoMatch.Core/StyleConf.cs b/LongoMatch.Core/StyleConf.cs
index 59f087f..cb5e0c2 100644
--- a/LongoMatch.Core/StyleConf.cs
+++ b/LongoMatch.Core/StyleConf.cs
@@ -59,6 +59,8 @@ namespace LongoMatch.Core.Common
                public const int ListCategoryHeight = 50;
                public const int ListCountRadio = 10;
                public const int ListCountWidth = 20;
+               public const int ListTextOffset =  ListRowSeparator * 2 + StyleConf.ListCountRadio * 2 + 
StyleConf.ListCountWidth;
+
                public const int ListEyeIconOffset = 10;
                public const string ListEyeIconPath = "hicolor/scalable/actions/longomatch-eye.svg";
 
diff --git a/LongoMatch.Drawing/PlayslistCellRenderer.cs b/LongoMatch.Drawing/PlayslistCellRenderer.cs
index 1c57ac0..a914a8f 100644
--- a/LongoMatch.Drawing/PlayslistCellRenderer.cs
+++ b/LongoMatch.Drawing/PlayslistCellRenderer.cs
@@ -61,7 +61,7 @@ namespace LongoMatch.Drawing
                {
                        double countX1, countX2, countY, countYC;
                        
-                       countX1 = cellArea.Start.X + cellArea.Width - StyleConf.ListImageWidth + 
StyleConf.ListCountRadio;
+                       countX1 = cellArea.Start.X + StyleConf.ListRowSeparator + StyleConf.ListCountRadio;
                        countX2 = countX1 + StyleConf.ListCountWidth;
                        countYC = backgroundArea.Start.Y + backgroundArea.Height / 2;
                        countY = countYC - StyleConf.ListCountRadio;
@@ -73,6 +73,7 @@ namespace LongoMatch.Drawing
                        tk.StrokeColor = Config.Style.PaletteBackgroundDark;
                        tk.FontAlignment = FontAlignment.Center;
                        tk.FontWeight = FontWeight.Bold;
+                       tk.FontSize = 14;
                        tk.DrawText (new Point (countX1, countY), StyleConf.ListCountWidth,
                                     2 * StyleConf.ListCountRadio, count.ToString ());
                }
@@ -107,7 +108,7 @@ namespace LongoMatch.Drawing
                        Point image, text;
                        double textWidth;
 
-                       image = new Point (cellArea.Start.X, cellArea.Start.Y);
+                       image = new Point (StyleConf.ListTextOffset, cellArea.Start.Y);
                        text = new Point (image.X + StyleConf.ListRowSeparator + StyleConf.ListImageWidth,
                                          cellArea.Start.Y);
                        textWidth = cellArea.Start.X + cellArea.Width - text.X;
@@ -125,9 +126,10 @@ namespace LongoMatch.Drawing
                public static void RenderPlaylist (Playlist playlist, int count, bool isExpanded, 
IDrawingToolkit tk,
                                                   IContext context, Area backgroundArea, Area cellArea)
                {
+                       Point textP = new Point (StyleConf.ListTextOffset, cellArea.Start.Y);
                        tk.Context = context;
                        tk.Begin ();
-                       RenderBackgroundAndText (isExpanded, tk, backgroundArea, cellArea.Start, 
cellArea.Width, playlist.Name);
+                       RenderBackgroundAndText (isExpanded, tk, backgroundArea, textP, cellArea.Width - 
textP.X, playlist.Name);
                        RenderCount (Config.Style.PaletteActive, count, tk, backgroundArea, cellArea);
                        RenderSeparationLine (tk, context, backgroundArea);
                        tk.End ();
@@ -136,9 +138,10 @@ namespace LongoMatch.Drawing
                public static void RenderAnalysisCategory (EventType cat, int count, bool isExpanded, 
IDrawingToolkit tk,
                                                           IContext context, Area backgroundArea, Area 
cellArea)
                {
+                       Point textP = new Point (StyleConf.ListTextOffset, cellArea.Start.Y);
                        tk.Context = context;
                        tk.Begin ();
-                       RenderBackgroundAndText (isExpanded, tk, backgroundArea, cellArea.Start, 
cellArea.Width, cat.Name);
+                       RenderBackgroundAndText (isExpanded, tk, backgroundArea, textP , cellArea.Width - 
textP.X, cat.Name);
                        RenderCount (cat.Color, count, tk, backgroundArea, cellArea);
                        RenderSeparationLine (tk, context, backgroundArea);
                        tk.End ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]