[longomatch] Fix positioning of timer line.
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Fix positioning of timer line.
- Date: Wed, 18 Mar 2015 14:39:26 +0000 (UTC)
commit 82e16e0a09c12e85e0bf84012816785ca4679456
Author: Julien Moutte <julien fluendo com>
Date: Wed Mar 11 23:26:38 2015 +0100
Fix positioning of timer line.
The previous code was only working if the height was 20 (as it used to be, but now it's configurable).
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 3e6677d..2744750 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 - StyleConf.TimelineLineSize;
+ linepos = OffsetY + Height / 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 a77c156..a1bb8ef 100644
--- a/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
@@ -366,10 +366,10 @@ namespace LongoMatch.Drawing.CanvasObjects
base.DrawBackground (tk, area);
if (ShowLine) {
- linepos = OffsetY + Height - StyleConf.TimelineLineSize;
+ linepos = OffsetY + Height / 2;
tk.FillColor = Config.Style.PaletteBackgroundDark;
tk.StrokeColor = Config.Style.PaletteBackgroundDark;
- tk.LineWidth = 4;
+ tk.LineWidth = StyleConf.TimelineBackgroundLineSize;
tk.DrawLine (new Point (0, linepos),
new Point (Width, linepos));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]