[longomatch] More fine tuning of the line position.



commit 304cfe2ecc2b0116e847865906a390239212796f
Author: Julien Moutte <julien fluendo com>
Date:   Thu Mar 12 15:17:35 2015 +0100

    More fine tuning of the line position.
    
    The line should be drawn right under the middle of the height. As the name will go above.

 LongoMatch.Drawing/CanvasObjects/TimeNodeObject.cs |    2 +-
 LongoMatch.Drawing/CanvasObjects/TimelineObject.cs |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.Drawing/CanvasObjects/TimeNodeObject.cs 
b/LongoMatch.Drawing/CanvasObjects/TimeNodeObject.cs
index 2744750..6f67805 100644
--- a/LongoMatch.Drawing/CanvasObjects/TimeNodeObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/TimeNodeObject.cs
@@ -227,7 +227,7 @@ namespace LongoMatch.Drawing.CanvasObjects
                        }
                        tk.LineWidth = StyleConf.TimelineLineSize;
                        
-                       linepos = OffsetY + Height / 2;
+                       linepos = OffsetY + Height / 2 + StyleConf.TimelineLineSize / 2;
                        
                        if (StopX - StartX <= needle.Width / 2) {
                                double c = movingPos == SelectionPosition.Left ? StopX : StartX;
diff --git a/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs 
b/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
index 8eab4be..49095f7 100644
--- a/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
@@ -362,11 +362,11 @@ namespace LongoMatch.Drawing.CanvasObjects
 
                protected override void DrawBackground (IDrawingToolkit tk, Area area)
                {
-                       double linepos;
                        base.DrawBackground (tk, area);
 
                        if (ShowLine) {
-                               linepos = OffsetY + Height / 2;
+                               // We want the background line and overlay to use the same starting point 
although they have different sizes.
+                               double linepos = OffsetY + Height / 2  + StyleConf.TimelineLineSize / 2;
                                tk.FillColor = Config.Style.PaletteBackgroundDark;
                                tk.StrokeColor = Config.Style.PaletteBackgroundDark;
                                tk.LineWidth = StyleConf.TimelineBackgroundLineSize;


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