[longomatch/newui: 29/104] Start with timelines customization
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/newui: 29/104] Start with timelines customization
- Date: Wed, 27 Aug 2014 08:51:27 +0000 (UTC)
commit 638745806461ff34697aa37c16dc401f70239094
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Aug 20 14:11:23 2014 +0200
Start with timelines customization
LongoMatch.Core/Common/Image.cs | 10 +++
LongoMatch.Core/Config.cs | 7 ++
.../Interfaces/Drawing/IDrawingToolkit.cs | 5 +-
LongoMatch.Core/StyleConf.cs | 8 ++
LongoMatch.Drawing.Cairo/CairoBackend.cs | 20 +++++-
LongoMatch.Drawing.Cairo/Surface.cs | 17 +++++
LongoMatch.Drawing/CanvasObjects/CategoryLabel.cs | 48 +++++++++++--
LongoMatch.Drawing/CanvasObjects/PlayObject.cs | 51 ++++++++++++---
LongoMatch.Drawing/CanvasObjects/TimeNodeObject.cs | 54 +++++++++-------
LongoMatch.Drawing/CanvasObjects/TimelineObject.cs | 46 ++++++++++---
LongoMatch.Drawing/Constants.cs | 4 -
LongoMatch.Drawing/Widgets/CategoriesLabels.cs | 15 +++--
LongoMatch.Drawing/Widgets/PlaysTimeline.cs | 12 ++--
LongoMatch.Drawing/Widgets/TimersTimeline.cs | 3 +-
LongoMatch.Drawing/Widgets/Timerule.cs | 21 ++++--
LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic | 2 +-
LongoMatch.GUI/Gui/Component/ProjectPeriods.cs | 2 +
LongoMatch.GUI/Gui/Component/Timeline.cs | 2 +-
.../LongoMatch.Gui.Component.CodingWidget.cs | 27 ++++----
.../LongoMatch.Gui.Component.ProjectPeriods.cs | 2 -
.../gtk-gui/LongoMatch.Gui.Component.Timeline.cs | 70 ++++++++++----------
.../gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs | 1 -
.../LongoMatch.Gui.Dialog.EditCategoryDialog.cs | 2 +-
.../LongoMatch.Gui.Panel.NewProjectPanel.cs | 2 +-
LongoMatch.GUI/gtk-gui/gui.stetic | 53 +++++++--------
LongoMatch.GUI/gtk-gui/objects.xml | 8 ++-
LongoMatch/Main.cs | 1 +
.../actions/longomatch-timeline-needle-big.svg | 14 ++++
.../actions/longomatch-timeline-needle-up.svg | 54 +++++++++++++++
data/theme/gtk-2.0/Buttons/button-rect-default.svg | 10 +--
.../theme/gtk-2.0/Buttons/button-rect-prelight.svg | 11 ++--
data/theme/gtk-2.0/Buttons/button-rect-pressed.svg | 15 +++--
design/ui/splash.jpg | Bin 0 -> 70706 bytes
33 files changed, 413 insertions(+), 184 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Image.cs b/LongoMatch.Core/Common/Image.cs
index efbbed6..db63f08 100644
--- a/LongoMatch.Core/Common/Image.cs
+++ b/LongoMatch.Core/Common/Image.cs
@@ -145,6 +145,16 @@ namespace LongoMatch.Common
}
}
+ public static Image LoadFromResource (string resource)
+ {
+ return new Image (SImage.LoadFromResource (resource));
+ }
+
+ public static Image LoadFromFile (string filename)
+ {
+ return new Image (new SImage (filename));
+ }
+
public static Image Composite(Image image1, Image image2) {
SImage dest = new SImage(image1.Value.Colorspace, true, image1.Value.BitsPerSample,
image1.Width, image1.Height);
diff --git a/LongoMatch.Core/Config.cs b/LongoMatch.Core/Config.cs
index 61a3950..2b9b58c 100644
--- a/LongoMatch.Core/Config.cs
+++ b/LongoMatch.Core/Config.cs
@@ -31,6 +31,7 @@ namespace LongoMatch
public static string homeDirectory;
public static string baseDirectory;
public static string configDirectory;
+ public static string dataDir;
/* State */
public static IGUIToolkit GUIToolkit;
@@ -139,6 +140,12 @@ namespace LongoMatch
}
}
+ public static string IconsDir {
+ get {
+ return Path.Combine (dataDir, "icons");
+ }
+ }
+
public static string PluginsDir {
get {
return RelativeToPrefix(String.Format("lib/{0}/plugins",
diff --git a/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
b/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
index 039f8fa..20d7c2f 100644
--- a/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
+++ b/LongoMatch.Core/Interfaces/Drawing/IDrawingToolkit.cs
@@ -30,6 +30,8 @@ namespace LongoMatch.Interfaces.Drawing
Image Copy ();
object Value {get;}
IContext Context {get;}
+ int Width { get; }
+ int Height { get; }
}
public interface IDrawingToolkit
@@ -45,8 +47,9 @@ namespace LongoMatch.Interfaces.Drawing
int FontSize {set;}
LineStyle LineStyle {set;}
+ ISurface CreateSurface (string filename);
ISurface CreateSurface (int width, int height, Image image=null);
- void DrawSurface (ISurface surface);
+ void DrawSurface (ISurface surface, Point p = null);
void Begin();
void End();
void Clear (Color color);
diff --git a/LongoMatch.Core/StyleConf.cs b/LongoMatch.Core/StyleConf.cs
index 2fad2b4..bbf3bb8 100644
--- a/LongoMatch.Core/StyleConf.cs
+++ b/LongoMatch.Core/StyleConf.cs
@@ -47,6 +47,14 @@ namespace LongoMatch.Common
public const int NewTeamsSpacing = 60;
public const int NewTaggerSpacing = 35;
+ public const string TimelineNeedleResource =
"hicolor/scalable/actions/longomatch-timeline-needle-big.svg";
+ public const string TimelineNeedleUP =
"hicolor/scalable/actions/longomatch-timeline-needle-up.svg";
+ public const int TimelineCategoryHeight = 20;
+ public const int TimelineLabelsWidth = 150;
+ public const int TimelineLabelHSpacing = 10;
+ public const int TimelineLabelVSpacing = 2;
+ public const int TimelineLineSize = 6;
+
public int BenchLineWidth = 2;
public int TeamTaggerBenchBorder = 10;
diff --git a/LongoMatch.Drawing.Cairo/CairoBackend.cs b/LongoMatch.Drawing.Cairo/CairoBackend.cs
index e28bde2..c764395 100644
--- a/LongoMatch.Drawing.Cairo/CairoBackend.cs
+++ b/LongoMatch.Drawing.Cairo/CairoBackend.cs
@@ -127,6 +127,11 @@ namespace LongoMatch.Drawing.Cairo
set;
}
+ public ISurface CreateSurface (string filename)
+ {
+ return new Surface (filename);
+ }
+
public ISurface CreateSurface (int width, int height, Image image=null)
{
return new Surface (width, height, image);
@@ -390,10 +395,19 @@ namespace LongoMatch.Drawing.Cairo
StrokeAndFill ();
}
- public void DrawSurface (ISurface surface)
+ public void DrawSurface (ISurface surface, Point p = null)
{
- CContext.SetSourceSurface (surface.Value as ImageSurface, 0, 0);
- CContext.Paint ();
+ ImageSurface image;
+
+ image = surface.Value as ImageSurface;
+ if (p == null) {
+ CContext.SetSourceSurface (image, 0, 0);
+ CContext.Paint ();
+ } else {
+ CContext.SetSourceSurface (image, (int)p.X, (int)p.Y);
+ CContext.Rectangle (p.X, p.Y, image.Width, image.Height);
+ CContext.Fill ();
+ }
}
public Image Copy (ICanvas canvas, double width, double height)
diff --git a/LongoMatch.Drawing.Cairo/Surface.cs b/LongoMatch.Drawing.Cairo/Surface.cs
index cfa6c93..cc7faf4 100644
--- a/LongoMatch.Drawing.Cairo/Surface.cs
+++ b/LongoMatch.Drawing.Cairo/Surface.cs
@@ -36,6 +36,11 @@ namespace LongoMatch.Drawing.Cairo
}
}
+ public Surface (string filename)
+ {
+ surface = new ImageSurface (filename);
+ }
+
public object Value {
get {
return surface;
@@ -48,6 +53,18 @@ namespace LongoMatch.Drawing.Cairo
}
}
+ public int Width {
+ get {
+ return surface.Width;
+ }
+ }
+
+ public int Height {
+ get {
+ return surface.Height;
+ }
+ }
+
public Image Copy ()
{
string tempFile = System.IO.Path.GetTempFileName ();
diff --git a/LongoMatch.Drawing/CanvasObjects/CategoryLabel.cs
b/LongoMatch.Drawing/CanvasObjects/CategoryLabel.cs
index a2175ec..97be2f2 100644
--- a/LongoMatch.Drawing/CanvasObjects/CategoryLabel.cs
+++ b/LongoMatch.Drawing/CanvasObjects/CategoryLabel.cs
@@ -18,28 +18,39 @@
using LongoMatch.Store;
using LongoMatch.Interfaces.Drawing;
using LongoMatch.Common;
+using System;
namespace LongoMatch.Drawing.CanvasObjects
{
public class CategoryLabel: CanvasObject, ICanvasObject
{
Category category;
- double width, height;
+ double width;
public CategoryLabel (Category category, double width, double height,
double offsetY)
{
this.category = category;
- this.height = height;
+ this.Height = height;
this.width = width;
OffsetY = offsetY;
}
+ public double Height {
+ get;
+ set;
+ }
+
public double Scroll {
get;
set;
}
+ public bool Even {
+ get;
+ set;
+ }
+
public double OffsetY {
set;
protected get;
@@ -47,19 +58,40 @@ namespace LongoMatch.Drawing.CanvasObjects
public override void Draw (IDrawingToolkit tk, Area area)
{
+ Color color;
+ double hs, vs, to, rectSize;
double y;
- y = OffsetY - Scroll;
+ if (Even) {
+ color = Config.Style.PaletteBackground;
+ } else {
+ color = Config.Style.PaletteBackgroundLight;
+ }
+
+ hs = StyleConf.TimelineLabelHSpacing;
+ vs = StyleConf.TimelineLabelVSpacing;
+ rectSize = Height - vs * 2;
+ to = hs + rectSize + hs;
+
+ y = OffsetY - Math.Floor (Scroll);
tk.Begin ();
+ tk.FillColor = color;
+ tk.StrokeColor = color;
+ tk.LineWidth = 0;
+ tk.DrawRectangle (new Point (0, y), width, Height);
+
+ /* Draw a rectangle with the category color */
tk.FillColor = category.Color;
tk.StrokeColor = category.Color;
+ tk.DrawRectangle (new Point (hs, y + vs), rectSize, rectSize);
+
+ /* Draw category name */
tk.FontSlant = FontSlant.Normal;
+ tk.FontWeight = FontWeight.Bold;
tk.FontSize = 12;
- tk.DrawRoundedRectangle (new Point (0, y + 1), width, height - 1, 3);
- tk.FillColor = Constants.TEXT_COLOR;
- tk.StrokeColor = Constants.TEXT_COLOR;
- tk.DrawText (new Point (0, y), width, height,
- category.Name);
+ tk.FillColor = Config.Style.PaletteWidgets;
+ tk.StrokeColor = Config.Style.PaletteWidgets;
+ tk.DrawText (new Point (to, y), width - to, Height, category.Name);
tk.End ();
}
}
diff --git a/LongoMatch.Drawing/CanvasObjects/PlayObject.cs b/LongoMatch.Drawing/CanvasObjects/PlayObject.cs
index c7b22a9..f30c156 100644
--- a/LongoMatch.Drawing/CanvasObjects/PlayObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/PlayObject.cs
@@ -42,20 +42,53 @@ namespace LongoMatch.Drawing.CanvasObjects
}
}
+ void DrawLine (IDrawingToolkit tk, double start, double stop, int lineWidth)
+ {
+ double y;
+
+ y = OffsetY + Height / 2;
+ tk.LineWidth = lineWidth;
+ tk.FillColor = Play.Category.Color;
+ tk.StrokeColor = Play.Category.Color;
+ if (stop - start <= lineWidth) {
+ tk.LineWidth = 0;
+ tk.DrawCircle (new Point (start + (stop - start) / 2, y), 3);
+ } else {
+ tk.DrawLine (new Point (start + lineWidth / 2, y),
+ new Point (stop - lineWidth / 2, y));
+ }
+ }
+
+ void DrawBorders (IDrawingToolkit tk, double start, double stop, int lineWidth)
+ {
+ double y1, y2;
+
+ tk.LineWidth = lineWidth;
+ tk.FillColor = Config.Style.PaletteWidgets;
+ tk.StrokeColor = Config.Style.PaletteWidgets;
+ y1 = OffsetY + 6;
+ y2 = OffsetY + Height - 6;
+ tk.DrawLine (new Point (start, y1), new Point (start, y2));
+ tk.DrawLine (new Point (stop, y1), new Point (stop, y2));
+ }
+
public override void Draw (IDrawingToolkit tk, Area area)
{
- Color c = Play.Category.Color;
+ double start, stop;
+ int lineWidth = StyleConf.TimelineLineSize;
+
tk.Begin ();
- tk.FillColor = new Color (c.R, c.G, c.B, (byte)(0.8 * byte.MaxValue));
- if (Selected) {
- tk.StrokeColor = Constants.PLAY_OBJECT_SELECTED_COLOR;
+
+ start = StartX;
+ stop = StopX;
+
+ if (stop - start <= lineWidth) {
+ DrawBorders (tk, start, stop, lineWidth);
+ DrawLine (tk, start, stop, lineWidth);
} else {
- tk.StrokeColor = Play.Category.Color;
+ DrawLine (tk, start, stop, lineWidth);
+ DrawBorders (tk, start, stop, lineWidth);
}
- tk.LineWidth = 2;
- tk.DrawRoundedRectangle (new Point (StartX, OffsetY),
- Utils.TimeToPos (Play.Duration, SecondsPerPixel),
- Constants.CATEGORY_HEIGHT, 2);
tk.End ();
}
}
diff --git a/LongoMatch.Drawing/CanvasObjects/TimeNodeObject.cs
b/LongoMatch.Drawing/CanvasObjects/TimeNodeObject.cs
index 87a6996..75b2239 100644
--- a/LongoMatch.Drawing/CanvasObjects/TimeNodeObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/TimeNodeObject.cs
@@ -21,11 +21,13 @@ using LongoMatch.Interfaces.Drawing;
using LongoMatch.Interfaces;
using LongoMatch.Common;
using LongoMatch.Store.Drawables;
+using System.IO;
namespace LongoMatch.Drawing.CanvasObjects
{
public class TimeNodeObject: CanvasObject, ICanvasSelectableObject
{
+ ISurface needle;
const int MAX_TIME_SPAN = 1000;
public TimeNodeObject (TimeNode node)
@@ -53,6 +55,12 @@ namespace LongoMatch.Drawing.CanvasObjects
get;
set;
}
+
+ public double Height {
+ get {
+ return StyleConf.TimelineCategoryHeight;
+ }
+ }
public double SecondsPerPixel {
set;
@@ -81,7 +89,7 @@ namespace LongoMatch.Drawing.CanvasObjects
public Selection GetSelection (Point point, double precision)
{
double accuracy;
- if (point.Y >= OffsetY && point.Y < OffsetY + Constants.CATEGORY_HEIGHT) {
+ if (point.Y >= OffsetY && point.Y < OffsetY + Height) {
if (Drawable.MatchAxis (point.X, StartX, precision, out accuracy)) {
return new Selection (this, SelectionPosition.Left, accuracy);
} else if (Drawable.MatchAxis (point.X, StopX, precision, out accuracy)) {
@@ -129,33 +137,33 @@ namespace LongoMatch.Drawing.CanvasObjects
public override void Draw (IDrawingToolkit tk, Area area)
{
- double mid, bottom, stop;
- Color c;
+ double linepos;
tk.Begin ();
- if (Selected) {
- c = Constants.TIMER_SELECTED_COLOR;
- } else {
- c = Constants.TIMER_UNSELECTED_COLOR;
+ if (needle == null) {
+ string path = Path.Combine (Config.IconsDir, StyleConf.TimelineNeedleUP);
+ Image img = Image.LoadFromFile (path);
+ needle = tk.CreateSurface (img.Width, img.Height, img);
}
- tk.FillColor = c;
- tk.StrokeColor = c;
- tk.LineWidth = 4;
- mid = OffsetY + Constants.CATEGORY_HEIGHT / 2;
- bottom = OffsetY + Constants.CATEGORY_HEIGHT;
- stop = Utils.TimeToPos (TimeNode.Stop, SecondsPerPixel);
+ tk.FillColor = Config.Style.PaletteBackgroundLight;
+ tk.StrokeColor = Config.Style.PaletteBackgroundLight;
+ tk.LineWidth = StyleConf.TimelineLineSize;
+
+ linepos = OffsetY + Height - StyleConf.TimelineLineSize;
- tk.DrawLine (new Point (StartX, OffsetY),
- new Point (StartX, bottom));
- tk.DrawLine (new Point (StartX, bottom),
- new Point (stop, bottom));
- tk.DrawLine (new Point (stop, OffsetY),
- new Point (stop, bottom));
- tk.FontSize = 20;
- tk.DrawText (new Point (StartX, OffsetY), stop - StartX,
- Constants.CATEGORY_HEIGHT - 4, TimeNode.Name);
-
+ tk.DrawLine (new Point (StartX, linepos),
+ new Point (StopX, linepos));
+ tk.DrawSurface (needle, new Point (StartX - needle.Width / 2, linepos - 9));
+ tk.DrawSurface (needle, new Point (StopX - needle.Width / 2, linepos - 9));
+
+ tk.FontSize = 16;
+ tk.FontWeight = FontWeight.Bold;
+ tk.FillColor = Config.Style.PaletteActive;
+ tk.StrokeColor = Config.Style.PaletteActive;
+ tk.DrawText (new Point (StartX, OffsetY), StopX - StartX,
+ Height - StyleConf.TimelineLineSize,
+ TimeNode.Name);
tk.End ();
}
}
diff --git a/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
b/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
index f2e2daa..f1b9f7a 100644
--- a/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/TimelineObject.cs
@@ -59,6 +59,12 @@ namespace LongoMatch.Drawing.CanvasObjects
set;
protected get;
}
+
+ public double Height {
+ get {
+ return StyleConf.TimelineCategoryHeight;
+ }
+ }
public double Width {
set;
@@ -79,6 +85,16 @@ namespace LongoMatch.Drawing.CanvasObjects
{
nodes.RemoveAll (po => po.TimeNode == node);
}
+
+ protected virtual void DrawBackground (IDrawingToolkit tk, Area area)
+ {
+ tk.FillColor = background;
+ tk.StrokeColor = background;
+ tk.LineWidth = 0;
+
+ tk.DrawRectangle (new Point (0, OffsetY), Width,
+ Height);
+ }
public override void Draw (IDrawingToolkit tk, Area area)
{
@@ -88,11 +104,7 @@ namespace LongoMatch.Drawing.CanvasObjects
selected = new List<TimeNodeObject> ();
tk.Begin ();
- tk.FillColor = background;
- tk.StrokeColor = background;
- tk.LineWidth = 1;
- tk.DrawRectangle (new Point (0, OffsetY), Width,
- Constants.CATEGORY_HEIGHT);
+ DrawBackground (tk, area);
foreach (TimeNodeObject p in nodes) {
if (p.Selected) {
selected.Add (p);
@@ -103,13 +115,13 @@ namespace LongoMatch.Drawing.CanvasObjects
foreach (TimeNodeObject p in selected) {
p.Draw (tk, area);
}
-
- tk.FillColor = Constants.TIMELINE_LINE_COLOR;
- tk.StrokeColor = Constants.TIMELINE_LINE_COLOR;
+
+ tk.FillColor = Config.Style.PaletteTool;
+ tk.StrokeColor = Config.Style.PaletteTool;
tk.LineWidth = Constants.TIMELINE_LINE_WIDTH;
position = Utils.TimeToPos (CurrentTime, secondsPerPixel);
tk.DrawLine (new Point (position, OffsetY),
- new Point (position, OffsetY + Constants.CATEGORY_HEIGHT));
+ new Point (position, OffsetY + Height));
tk.End ();
}
@@ -118,7 +130,7 @@ namespace LongoMatch.Drawing.CanvasObjects
{
Selection selection = null;
- if (point.Y >= OffsetY && point.Y < OffsetY + Constants.CATEGORY_HEIGHT) {
+ if (point.Y >= OffsetY && point.Y < OffsetY + Height) {
foreach (TimeNodeObject po in nodes) {
Selection tmp;
tmp = po.GetSelection (point, precision);
@@ -181,6 +193,20 @@ namespace LongoMatch.Drawing.CanvasObjects
}
}
}
+
+ protected override void DrawBackground (IDrawingToolkit tk, Area area)
+ {
+ double linepos;
+ base.DrawBackground (tk, area);
+
+ linepos = OffsetY + Height - StyleConf.TimelineLineSize;
+
+ tk.FillColor = Config.Style.PaletteBackgroundDark;
+ tk.StrokeColor = Config.Style.PaletteBackgroundDark;
+ tk.LineWidth = 4;
+ tk.DrawLine (new Point (0, linepos),
+ new Point (Width, linepos));
+ }
}
}
diff --git a/LongoMatch.Drawing/Constants.cs b/LongoMatch.Drawing/Constants.cs
index f2a852c..a5e7382 100644
--- a/LongoMatch.Drawing/Constants.cs
+++ b/LongoMatch.Drawing/Constants.cs
@@ -24,9 +24,6 @@ namespace LongoMatch.Drawing
{
public class Constants
{
- public const int CATEGORY_HEIGHT = 20;
- public const int CATEGORY_WIDTH = 150;
- public const int CATEGORY_H_SPACE = 5;
public const int TIMER_HEIGHT = 20;
public const int TIMERULE_HEIGHT = 30;
public const int TAGGER_POINT_SIZE = 5;
@@ -36,7 +33,6 @@ namespace LongoMatch.Drawing
public const int CATEGORY_TPL_GRID = 10;
public const double TIMELINE_ACCURACY = 5;
public static Color TEXT_COLOR = Color.Black;
- public static Color TIMELINE_LINE_COLOR = Color.Black;
public static Color TIMERULE_BACKGROUND = Color.White;
public static Color PLAY_OBJECT_SELECTED_COLOR = Color.Black;
public static Color PLAY_OBJECT_UNSELECTED_COLOR = Color.Grey1;
diff --git a/LongoMatch.Drawing/Widgets/CategoriesLabels.cs b/LongoMatch.Drawing/Widgets/CategoriesLabels.cs
index f7f2058..4885353 100644
--- a/LongoMatch.Drawing/Widgets/CategoriesLabels.cs
+++ b/LongoMatch.Drawing/Widgets/CategoriesLabels.cs
@@ -58,18 +58,18 @@ namespace LongoMatch.Drawing.Widgets
void FillCanvas ()
{
- int i = 0;
+ int i = 0, w, h;
- widget.Width = Constants.CATEGORY_WIDTH;
+ w = StyleConf.TimelineLabelsWidth;
+ h = StyleConf.TimelineCategoryHeight;
+ widget.Width = w;
/* Start from bottom to top with categories */
foreach (Category cat in project.Categories.CategoriesList) {
CategoryLabel l;
/* Add the category label */
- l = new CategoryLabel (cat, Constants.CATEGORY_WIDTH,
- Constants.CATEGORY_HEIGHT,
- i * Constants.CATEGORY_HEIGHT);
+ l = new CategoryLabel (cat, w, h, i * h);
categories [cat] = l;
Objects.Add (l);
i++;
@@ -84,8 +84,11 @@ namespace LongoMatch.Drawing.Widgets
CategoryLabel label = categories [cat];
if (filter.VisibleCategories.Contains (cat)) {
- label.OffsetY = i * Constants.CATEGORY_HEIGHT;
+ label.OffsetY = i * label.Height;
label.Visible = true;
+ if (i % 2 == 0) {
+ label.Even = true;
+ }
i++;
} else {
label.Visible = false;
diff --git a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
index e3b2f9f..3805afb 100644
--- a/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/PlaysTimeline.cs
@@ -52,7 +52,7 @@ namespace LongoMatch.Drawing.Widgets
Objects.Clear ();
categories.Clear ();
duration = project.Description.File.Duration;
- widget.Height = project.Categories.List.Count * Constants.CATEGORY_HEIGHT;
+ widget.Height = project.Categories.List.Count * StyleConf.TimelineCategoryHeight;
playsFilter = filter;
FillCanvas ();
filter.FilterUpdated += UpdateVisibleCategories;
@@ -107,14 +107,14 @@ namespace LongoMatch.Drawing.Widgets
Color c;
if (i % 2 == 0) {
- c = Color.White;
+ c = Config.Style.PaletteBackground;
} else {
- c = Color.Grey1;
+ c = Config.Style.PaletteBackgroundLight;
}
cat = project.Categories.CategoriesList [i];
tl = new CategoryTimeline (project.PlaysInCategory (cat),
- duration, i * Constants.CATEGORY_HEIGHT, c);
+ duration, i * StyleConf.TimelineCategoryHeight, c);
categories [cat] = tl;
Objects.Add (tl);
}
@@ -128,7 +128,7 @@ namespace LongoMatch.Drawing.Widgets
foreach (Category cat in categories.Keys) {
TimelineObject timeline = categories [cat];
if (playsFilter.VisibleCategories.Contains (cat)) {
- timeline.OffsetY = i * Constants.CATEGORY_HEIGHT;
+ timeline.OffsetY = i * timeline.Height;
timeline.Visible = true;
i++;
} else {
@@ -176,7 +176,7 @@ namespace LongoMatch.Drawing.Widgets
TimelineObject tl = categories [c];
if (!tl.Visible)
continue;
- if (coords.Y >= tl.OffsetY && coords.Y < tl.OffsetY +
Constants.CATEGORY_HEIGHT) {
+ if (coords.Y >= tl.OffsetY && coords.Y < tl.OffsetY + tl.Height) {
cat = c;
break;
}
diff --git a/LongoMatch.Drawing/Widgets/TimersTimeline.cs b/LongoMatch.Drawing/Widgets/TimersTimeline.cs
index ae0780e..e8c94e0 100644
--- a/LongoMatch.Drawing/Widgets/TimersTimeline.cs
+++ b/LongoMatch.Drawing/Widgets/TimersTimeline.cs
@@ -74,7 +74,8 @@ namespace LongoMatch.Drawing.Widgets
{
if (!splitTimers) {
widget.Height = Constants.TIMER_HEIGHT;
- TimerTimeline tl = new TimerTimeline (timers, duration, 0, Color.White);
+ TimerTimeline tl = new TimerTimeline (timers, duration, 0,
+ Config.Style.PaletteBackground);
foreach (Timer t in timers) {
this.timers [t] = tl;
}
diff --git a/LongoMatch.Drawing/Widgets/Timerule.cs b/LongoMatch.Drawing/Widgets/Timerule.cs
index 9d559d5..1823fe8 100644
--- a/LongoMatch.Drawing/Widgets/Timerule.cs
+++ b/LongoMatch.Drawing/Widgets/Timerule.cs
@@ -20,6 +20,7 @@ using LongoMatch.Store;
using LongoMatch.Common;
using LongoMatch.Interfaces.Drawing;
using LongoMatch.Interfaces;
+using System.IO;
namespace LongoMatch.Drawing.Widgets
{
@@ -29,6 +30,7 @@ namespace LongoMatch.Drawing.Widgets
const int SMALL_LINE_HEIGHT = 5;
const int TEXT_WIDTH = 20;
const int TIME_SPACING = 100;
+ ISurface needle;
public Timerule (IWidget widget):base (widget)
{
@@ -65,14 +67,19 @@ namespace LongoMatch.Drawing.Widgets
if (Duration == null) {
return;
}
+
+ if (needle == null) {
+ string path = Path.Combine (Config.IconsDir,
StyleConf.TimelineNeedleResource);
+ Image img = Image.LoadFromFile (path);
+ needle = tk.CreateSurface (img.Width, img.Height, img);
+ }
tk.Context = context;
tk.Begin ();
- tk.FillColor = Constants.TIMERULE_BACKGROUND;
- tk.StrokeColor = Constants.TIMERULE_BACKGROUND;
- tk.DrawRectangle (new Point (0, 0), width, height);
+ tk.Clear (Config.Style.PaletteBackgroundDark);
- tk.StrokeColor = Constants.TIMELINE_LINE_COLOR;
+ tk.StrokeColor = Config.Style.PaletteWidgets;
+ tk.FillColor = Config.Style.PaletteWidgets;
tk.LineWidth = Constants.TIMELINE_LINE_WIDTH;
tk.FontSlant = FontSlant.Normal;
tk.FontSize = 12;
@@ -102,10 +109,8 @@ namespace LongoMatch.Drawing.Widgets
/* Draw position triangle */
tpos = Utils.TimeToPos (CurrentTime, SecondsPerPixel);
tpos -= Scroll;
- tk.FillColor = Constants.TIMELINE_LINE_COLOR;
- tk.DrawTriangle (new Point (tpos, widget.Height), 8,
- BIG_LINE_HEIGHT, SelectionPosition.Bottom);
-
+ tpos -= needle.Width / 2;
+ tk.DrawSurface (needle, new Point (tpos, widget.Height - needle.Height));
tk.End ();
tk.Context = null;
}
diff --git a/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic b/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
index fe3495b..ff6effa 100644
--- a/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
@@ -563,7 +563,7 @@
</widget>
</child>
</widget>
- <widget class="Gtk.Bin" id="LongoMatch.Gui.PlayerCapturerBin" design-size="868 300">
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.PlayerCapturerBin" design-size="936 300">
<property name="MemberName" />
<property name="Visible">False</property>
<child>
diff --git a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
index fea8aae..f50aa0c 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
@@ -21,6 +21,7 @@ using System.Collections.Generic;
using LongoMatch.Drawing.Widgets;
using LongoMatch.Drawing.Cairo;
using Mono.Unix;
+using LongoMatch.Gui.Helpers;
namespace LongoMatch.Gui.Component
{
@@ -47,6 +48,7 @@ namespace LongoMatch.Gui.Component
synclabel.Markup = String.Format ("{0} {1} {2}", "<b>⬇ ",
Catalog.GetString ("Synchronize the game periods"),
" ⬇</b>");
+ Misc.DisableFocus (this);
}
protected override void OnDestroyed ()
diff --git a/LongoMatch.GUI/Gui/Component/Timeline.cs b/LongoMatch.GUI/Gui/Component/Timeline.cs
index 50c2e0f..bcf6305 100644
--- a/LongoMatch.GUI/Gui/Component/Timeline.cs
+++ b/LongoMatch.GUI/Gui/Component/Timeline.cs
@@ -58,7 +58,7 @@ namespace LongoMatch.Gui.Component
focusscale.Adjustment.Upper = 12;
focusscale.ValueChanged += HandleValueChanged;
timerulearea.HeightRequest = LongoMatch.Drawing.Constants.TIMERULE_HEIGHT;
- labelsarea.WidthRequest = LongoMatch.Drawing.Constants.CATEGORY_WIDTH;
+ labelsarea.WidthRequest = StyleConf.TimelineCategoryHeight;
hbox1.HeightRequest = LongoMatch.Drawing.Constants.TIMERULE_HEIGHT;
scrolledwindow1.Vadjustment.ValueChanged += HandleScrollEvent;
scrolledwindow1.Hadjustment.ValueChanged += HandleScrollEvent;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
index f5e0fbe..8afe38f 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.CodingWidget.cs
@@ -5,11 +5,11 @@ namespace LongoMatch.Gui.Component
public partial class CodingWidget
{
private global::Gtk.UIManager UIManager;
- private global::Gtk.RadioAction positionMode;
private global::Gtk.RadioAction timelineMode;
private global::Gtk.RadioAction autoTaggingMode;
private global::Gtk.Action zoomFitAction;
private global::Gtk.RadioAction convertAction;
+ private global::Gtk.RadioAction positionMode;
private global::Gtk.VBox vbox;
private global::Gtk.HBox hbox1;
private global::Gtk.Toolbar codingtoolbar;
@@ -30,23 +30,23 @@ namespace LongoMatch.Gui.Component
// Widget LongoMatch.Gui.Component.CodingWidget
Stetic.BinContainer w1 = global::Stetic.BinContainer.Attach (this);
this.UIManager = new global::Gtk.UIManager ();
- global::Gtk.ActionGroup w2 = new global::Gtk.ActionGroup ("Timeline");
- this.positionMode = new global::Gtk.RadioAction ("positionMode", null, null,
"gtk-justify-fill", 0);
- this.positionMode.Group = new global::GLib.SList (global::System.IntPtr.Zero);
- w2.Add (this.positionMode, null);
- this.UIManager.InsertActionGroup (w2, 0);
- global::Gtk.ActionGroup w3 = new global::Gtk.ActionGroup ("Default");
+ global::Gtk.ActionGroup w2 = new global::Gtk.ActionGroup ("Default");
this.timelineMode = new global::Gtk.RadioAction ("timelineMode", null,
global::Mono.Unix.Catalog.GetString ("Timeline view"), "gtk-justify-fill", 0);
- this.timelineMode.Group = this.positionMode.Group;
- w3.Add (this.timelineMode, null);
+ this.timelineMode.Group = new global::GLib.SList (global::System.IntPtr.Zero);
+ w2.Add (this.timelineMode, null);
this.autoTaggingMode = new global::Gtk.RadioAction ("autoTaggingMode", null,
global::Mono.Unix.Catalog.GetString ("Automatic tagging view"), "gtk-select-color", 0);
this.autoTaggingMode.Group = this.timelineMode.Group;
- w3.Add (this.autoTaggingMode, null);
+ w2.Add (this.autoTaggingMode, null);
this.zoomFitAction = new global::Gtk.Action ("zoomFitAction", null, null,
"gtk-zoom-fit");
- w3.Add (this.zoomFitAction, null);
+ w2.Add (this.zoomFitAction, null);
this.convertAction = new global::Gtk.RadioAction ("convertAction", null, null,
"gtk-convert", 0);
this.convertAction.Group = this.autoTaggingMode.Group;
- w3.Add (this.convertAction, null);
+ w2.Add (this.convertAction, null);
+ this.UIManager.InsertActionGroup (w2, 0);
+ global::Gtk.ActionGroup w3 = new global::Gtk.ActionGroup ("Timeline");
+ this.positionMode = new global::Gtk.RadioAction ("positionMode", null, null,
"gtk-justify-fill", 0);
+ this.positionMode.Group = this.autoTaggingMode.Group;
+ w3.Add (this.positionMode, null);
this.UIManager.InsertActionGroup (w3, 1);
this.Name = "LongoMatch.Gui.Component.CodingWidget";
// Container child LongoMatch.Gui.Component.CodingWidget.Gtk.Container+ContainerChild
@@ -76,7 +76,8 @@ namespace LongoMatch.Gui.Component
this.notebook = new global::Gtk.Notebook ();
this.notebook.CanFocus = true;
this.notebook.Name = "notebook";
- this.notebook.CurrentPage = 2;
+ this.notebook.CurrentPage = 1;
+ this.notebook.TabPos = ((global::Gtk.PositionType)(0));
// Container child notebook.Gtk.Notebook+NotebookChild
this.hpaned1 = new global::Gtk.HPaned ();
this.hpaned1.CanFocus = true;
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectPeriods.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectPeriods.cs
index 2e2c253..2d76c00 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectPeriods.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectPeriods.cs
@@ -105,7 +105,6 @@ namespace LongoMatch.Gui.Component
// Container child hbox3.Gtk.Box+BoxChild
this.vbox7 = new global::Gtk.VBox ();
this.vbox7.Name = "vbox7";
- this.vbox7.Spacing = 6;
// Container child vbox7.Gtk.Box+BoxChild
this.drawingarea1 = new global::Gtk.DrawingArea ();
this.drawingarea1.Name = "drawingarea1";
@@ -117,7 +116,6 @@ namespace LongoMatch.Gui.Component
this.scrolledwindow2.HeightRequest = 50;
this.scrolledwindow2.CanFocus = true;
this.scrolledwindow2.Name = "scrolledwindow2";
- this.scrolledwindow2.ShadowType = ((global::Gtk.ShadowType)(1));
// Container child scrolledwindow2.Gtk.Container+ContainerChild
global::Gtk.Viewport w23 = new global::Gtk.Viewport ();
w23.ShadowType = ((global::Gtk.ShadowType)(0));
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Timeline.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Timeline.cs
index 69a867d..d8de2f3 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Timeline.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.Timeline.cs
@@ -7,9 +7,9 @@ namespace LongoMatch.Gui.Component
private global::Gtk.HBox hbox1;
private global::Gtk.VBox vbox4;
private global::Gtk.HBox hbox2;
- private global::Gtk.HScale focusscale;
private global::Gtk.Button focusbutton;
private global::Gtk.DrawingArea labelsarea;
+ private global::Gtk.HScale focusscale;
private global::Gtk.VBox vbox1;
private global::Gtk.DrawingArea timerulearea;
private global::Gtk.ScrolledWindow scrolledwindow1;
@@ -24,62 +24,62 @@ namespace LongoMatch.Gui.Component
// Container child LongoMatch.Gui.Component.Timeline.Gtk.Container+ContainerChild
this.hbox1 = new global::Gtk.HBox ();
this.hbox1.Name = "hbox1";
- this.hbox1.Spacing = 6;
// Container child hbox1.Gtk.Box+BoxChild
this.vbox4 = new global::Gtk.VBox ();
this.vbox4.Name = "vbox4";
- this.vbox4.Spacing = 6;
// Container child vbox4.Gtk.Box+BoxChild
this.hbox2 = new global::Gtk.HBox ();
this.hbox2.HeightRequest = 30;
this.hbox2.Name = "hbox2";
this.hbox2.Spacing = 6;
// Container child hbox2.Gtk.Box+BoxChild
- this.focusscale = new global::Gtk.HScale (null);
- this.focusscale.Name = "focusscale";
- this.focusscale.Adjustment.Upper = 100;
- this.focusscale.Adjustment.PageIncrement = 10;
- this.focusscale.Adjustment.StepIncrement = 1;
- this.focusscale.DrawValue = false;
- this.focusscale.Digits = 0;
- this.focusscale.ValuePos = ((global::Gtk.PositionType)(2));
- this.hbox2.Add (this.focusscale);
- global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.focusscale]));
- w1.Position = 0;
- // Container child hbox2.Gtk.Box+BoxChild
this.focusbutton = new global::Gtk.Button ();
this.focusbutton.Name = "focusbutton";
this.focusbutton.UseUnderline = true;
// Container child focusbutton.Gtk.Container+ContainerChild
- global::Gtk.Alignment w2 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
+ global::Gtk.Alignment w1 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
- global::Gtk.HBox w3 = new global::Gtk.HBox ();
- w3.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Image w4 = new global::Gtk.Image ();
- w4.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-zoom-fit",
global::Gtk.IconSize.Menu);
- w3.Add (w4);
+ global::Gtk.HBox w2 = new global::Gtk.HBox ();
+ w2.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
- global::Gtk.Label w6 = new global::Gtk.Label ();
- w3.Add (w6);
+ global::Gtk.Image w3 = new global::Gtk.Image ();
+ w3.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-zoom-fit",
global::Gtk.IconSize.Menu);
w2.Add (w3);
- this.focusbutton.Add (w2);
+ // Container child GtkHBox.Gtk.Container+ContainerChild
+ global::Gtk.Label w5 = new global::Gtk.Label ();
+ w2.Add (w5);
+ w1.Add (w2);
+ this.focusbutton.Add (w1);
this.hbox2.Add (this.focusbutton);
- global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.focusbutton]));
- w10.Position = 1;
+ global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox2
[this.focusbutton]));
+ w9.Position = 0;
+ w9.Fill = false;
+ this.vbox4.Add (this.hbox2);
+ global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox2]));
+ w10.Position = 0;
w10.Expand = false;
w10.Fill = false;
- this.vbox4.Add (this.hbox2);
- global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox2]));
- w11.Position = 0;
- w11.Expand = false;
- w11.Fill = false;
// Container child vbox4.Gtk.Box+BoxChild
this.labelsarea = new global::Gtk.DrawingArea ();
this.labelsarea.Name = "labelsarea";
this.vbox4.Add (this.labelsarea);
- global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox4
[this.labelsarea]));
- w12.Position = 1;
+ global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox4
[this.labelsarea]));
+ w11.Position = 1;
+ // Container child vbox4.Gtk.Box+BoxChild
+ this.focusscale = new global::Gtk.HScale (null);
+ this.focusscale.CanFocus = true;
+ this.focusscale.Name = "focusscale";
+ this.focusscale.Adjustment.Upper = 100;
+ this.focusscale.Adjustment.PageIncrement = 10;
+ this.focusscale.Adjustment.StepIncrement = 1;
+ this.focusscale.DrawValue = false;
+ this.focusscale.Digits = 0;
+ this.focusscale.ValuePos = ((global::Gtk.PositionType)(2));
+ this.vbox4.Add (this.focusscale);
+ global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox4
[this.focusscale]));
+ w12.Position = 2;
+ w12.Expand = false;
+ w12.Fill = false;
this.hbox1.Add (this.vbox4);
global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox4]));
w13.Position = 0;
@@ -88,7 +88,6 @@ namespace LongoMatch.Gui.Component
// Container child hbox1.Gtk.Box+BoxChild
this.vbox1 = new global::Gtk.VBox ();
this.vbox1.Name = "vbox1";
- this.vbox1.Spacing = 6;
// Container child vbox1.Gtk.Box+BoxChild
this.timerulearea = new global::Gtk.DrawingArea ();
this.timerulearea.Name = "timerulearea";
@@ -101,7 +100,6 @@ namespace LongoMatch.Gui.Component
this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
this.scrolledwindow1.CanFocus = true;
this.scrolledwindow1.Name = "scrolledwindow1";
- this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1));
// Container child scrolledwindow1.Gtk.Container+ContainerChild
global::Gtk.Viewport w15 = new global::Gtk.Viewport ();
w15.ShadowType = ((global::Gtk.ShadowType)(0));
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
index cd6491f..f1d6d2e 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.DrawingTool.cs
@@ -102,7 +102,6 @@ namespace LongoMatch.Gui.Dialog
this.anglebutton.TooltipMarkup = "Angle tool";
this.anglebutton.CanFocus = true;
this.anglebutton.Name = "anglebutton";
- this.anglebutton.Active = true;
this.anglebutton.DrawIndicator = false;
this.anglebutton.UseUnderline = true;
this.anglebutton.Group = new global::GLib.SList (global::System.IntPtr.Zero);
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
index 12b87a9..b6551bb 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.EditCategoryDialog.cs
@@ -50,7 +50,7 @@ namespace LongoMatch.Gui.Dialog
this.Child.ShowAll ();
}
this.DefaultWidth = 522;
- this.DefaultHeight = 538;
+ this.DefaultHeight = 631;
this.Show ();
}
}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.NewProjectPanel.cs
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.NewProjectPanel.cs
index 13fcfab..a5d5a53 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.NewProjectPanel.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Panel.NewProjectPanel.cs
@@ -198,7 +198,7 @@ namespace LongoMatch.Gui.Panel
this.notebook1 = new global::Gtk.Notebook ();
this.notebook1.CanFocus = true;
this.notebook1.Name = "notebook1";
- this.notebook1.CurrentPage = 1;
+ this.notebook1.CurrentPage = 2;
this.notebook1.ShowBorder = false;
this.notebook1.Scrollable = true;
// Container child notebook1.Gtk.Notebook+NotebookChild
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index fecbe6e..e705518 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -2769,7 +2769,7 @@ Hotkeys with a single key are also allowed with Ctrl+key.</property>
</widget>
</child>
</widget>
- <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.EditCategoryDialog" design-size="522 538">
+ <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.EditCategoryDialog" design-size="522 631">
<property name="MemberName" />
<property name="Title" translatable="yes">Category Details</property>
<property name="Icon">stock:longomatch Menu</property>
@@ -6379,7 +6379,7 @@ You can continue with the current capture, cancel it or save your project.
<widget class="Gtk.Notebook" id="notebook1">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="CurrentPage">1</property>
+ <property name="CurrentPage">2</property>
<property name="ShowBorder">False</property>
<property name="Scrollable">True</property>
<child>
@@ -9252,38 +9252,21 @@ You can continue with the current capture, cancel it or save your project.
</widget>
</child>
</widget>
- <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.Timeline" design-size="671 350">
+ <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.Timeline" design-size="740 258">
<property name="MemberName" />
<property name="Visible">False</property>
<child>
<widget class="Gtk.HBox" id="hbox1">
<property name="MemberName" />
- <property name="Spacing">6</property>
<child>
<widget class="Gtk.VBox" id="vbox4">
<property name="MemberName" />
- <property name="Spacing">6</property>
<child>
<widget class="Gtk.HBox" id="hbox2">
<property name="MemberName" />
<property name="HeightRequest">30</property>
<property name="Spacing">6</property>
<child>
- <widget class="Gtk.HScale" id="focusscale">
- <property name="MemberName" />
- <property name="Upper">100</property>
- <property name="PageIncrement">10</property>
- <property name="StepIncrement">1</property>
- <property name="DrawValue">False</property>
- <property name="Digits">0</property>
- <property name="ValuePos">Top</property>
- </widget>
- <packing>
- <property name="Position">0</property>
- <property name="AutoSize">True</property>
- </packing>
- </child>
- <child>
<widget class="Gtk.Button" id="focusbutton">
<property name="MemberName" />
<property name="Type">TextAndIcon</property>
@@ -9292,9 +9275,8 @@ You can continue with the current capture, cancel it or save your project.
<property name="UseUnderline">True</property>
</widget>
<packing>
- <property name="Position">1</property>
- <property name="AutoSize">True</property>
- <property name="Expand">False</property>
+ <property name="Position">0</property>
+ <property name="AutoSize">False</property>
<property name="Fill">False</property>
</packing>
</child>
@@ -9315,6 +9297,24 @@ You can continue with the current capture, cancel it or save your project.
<property name="AutoSize">False</property>
</packing>
</child>
+ <child>
+ <widget class="Gtk.HScale" id="focusscale">
+ <property name="MemberName" />
+ <property name="CanFocus">True</property>
+ <property name="Upper">100</property>
+ <property name="PageIncrement">10</property>
+ <property name="StepIncrement">1</property>
+ <property name="DrawValue">False</property>
+ <property name="Digits">0</property>
+ <property name="ValuePos">Top</property>
+ </widget>
+ <packing>
+ <property name="Position">2</property>
+ <property name="AutoSize">True</property>
+ <property name="Expand">False</property>
+ <property name="Fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="Position">0</property>
@@ -9326,7 +9326,6 @@ You can continue with the current capture, cancel it or save your project.
<child>
<widget class="Gtk.VBox" id="vbox1">
<property name="MemberName" />
- <property name="Spacing">6</property>
<child>
<widget class="Gtk.DrawingArea" id="timerulearea">
<property name="MemberName" />
@@ -9342,7 +9341,6 @@ You can continue with the current capture, cancel it or save your project.
<widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="ShadowType">In</property>
<child>
<widget class="Gtk.Viewport" id="GtkViewport">
<property name="MemberName" />
@@ -9462,7 +9460,8 @@ You can continue with the current capture, cancel it or save your project.
<widget class="Gtk.Notebook" id="notebook">
<property name="MemberName" />
<property name="CanFocus">True</property>
- <property name="CurrentPage">2</property>
+ <property name="CurrentPage">1</property>
+ <property name="TabPos">Left</property>
<child>
<widget class="Gtk.HPaned" id="hpaned1">
<property name="MemberName" />
@@ -9628,7 +9627,6 @@ You can continue with the current capture, cancel it or save your project.
<child>
<widget class="Gtk.VBox" id="vbox7">
<property name="MemberName" />
- <property name="Spacing">6</property>
<child>
<widget class="Gtk.DrawingArea" id="drawingarea1">
<property name="MemberName" />
@@ -9643,7 +9641,6 @@ You can continue with the current capture, cancel it or save your project.
<property name="MemberName" />
<property name="HeightRequest">50</property>
<property name="CanFocus">True</property>
- <property name="ShadowType">In</property>
<child>
<widget class="Gtk.Viewport" id="GtkViewport">
<property name="MemberName" />
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index f9c37db..ea18bfb 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -293,7 +293,6 @@
<itemgroup label="PlayerBin Signals">
<signal name="Tick" />
<signal name="PlayStateChanged" />
- <signal name="SeekEvent" />
</itemgroup>
</signals>
</object>
@@ -306,7 +305,6 @@
<signals>
<itemgroup label="IPlayerBin Signals">
<signal name="PlayStateChanged" />
- <signal name="SeekEvent" />
</itemgroup>
</signals>
</object>
@@ -316,7 +314,11 @@
</object>
<object type="LongoMatch.Gui.Component.MediaFileChooser" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups />
- <signals />
+ <signals>
+ <itemgroup label="MediaFileChooser Signals">
+ <signal name="ChangedEvent" />
+ </itemgroup>
+ </signals>
</object>
<object type="LongoMatch.Gui.Component.DatePicker" palette-category="General" allow-children="false"
base-type="Gtk.Bin">
<itemgroups>
diff --git a/LongoMatch/Main.cs b/LongoMatch/Main.cs
index f7b533c..e1e49d9 100644
--- a/LongoMatch/Main.cs
+++ b/LongoMatch/Main.cs
@@ -87,6 +87,7 @@ namespace LongoMatch
dataDir = Path.Combine (Config.baseDirectory, "share",
Constants.SOFTWARE_NAME.ToLower ());
}
+ Config.dataDir = dataDir;
gtkRC = Path.Combine (dataDir, "theme", "gtk-2.0", "gtkrc");
if (File.Exists (gtkRC)) {
diff --git a/data/icons/hicolor/scalable/actions/longomatch-timeline-needle-big.svg
b/data/icons/hicolor/scalable/actions/longomatch-timeline-needle-big.svg
new file mode 100644
index 0000000..5169b18
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/longomatch-timeline-needle-big.svg
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="11px" height="20px" viewBox="0.432 0.45 11 20" enable-background="new 0.432 0.45 11 20"
xml:space="preserve">
+<path id="location" fill="#50B44B" d="M5.932,20.449c-0.145,0-0.281-0.092-0.369-0.25l-3.942-7.602l-0.144-0.275
+
C0.8,11.039,0.441,9.526,0.441,7.95c0-4.137,2.462-7.5,5.49-7.5c3.023,0,5.49,3.364,5.49,7.5c0,1.576-0.359,3.089-1.041,4.374
+ l-0.189,0.363l-3.895,7.512C6.209,20.357,6.074,20.449,5.932,20.449z
M5.951,4.2c-1.011,0-1.384,2.372-1.384,3.75
+ c0,1.379,0.373,3.749,1.384,3.749c1.012,0,1.385-2.37,1.385-3.749C7.336,6.572,6.961,4.2,5.951,4.2z"/>
+<path fill="none"
d="M21.045,8.171c0-1.378-0.375-3.75-1.385-3.75c-1.011,0-1.384,2.372-1.384,3.75c0,1.127,0.256,2.897,0.899,3.513
+ h0.969C20.789,11.068,21.045,9.298,21.045,8.171z"/>
+<path fill="#D33B37"
d="M6.436,11.463c-0.144,0.137-0.3,0.236-0.484,0.236s-0.341-0.1-0.484-0.236H5.392v8.406v0.581h1.08v-0.588
+ v-8.399H6.436z"/>
+</svg>
diff --git a/data/icons/hicolor/scalable/actions/longomatch-timeline-needle-up.svg
b/data/icons/hicolor/scalable/actions/longomatch-timeline-needle-up.svg
new file mode 100644
index 0000000..0e6472f
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/longomatch-timeline-needle-up.svg
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ width="11"
+ height="14"
+ viewBox="0 0 11 14"
+ enable-background="new 0 0 6 12"
+ xml:space="preserve"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="timeline-needle-up.svg"><metadata
+ id="metadata8"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage"
/><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs6" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1343"
+ inkscape:window-height="778"
+ id="namedview4"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:zoom="48.244792"
+ inkscape:cx="2.1271673"
+ inkscape:cy="6.796105"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="Layer_1" /><path
+ id="location"
+ clip-rule="evenodd"
+ d="M 5.5,0 C 5.6449814,0 5.7806691,0.06452 5.8680297,0.173607 L 9.8178439,5.4956012 9.9609665,5.6891495
C 10.641264,6.5876833 11,7.6469209 11,8.7495602 11,11.644575 8.5334573,14 5.5,14 2.468402,14 0,11.645748
0,8.7495602 0,7.6469209 0.358736,6.5888563 1.040892,5.6868035 L 1.232342,5.4322581 5.133829,0.174779 C
5.2193305,0.064517 5.3550186,0 5.5,0 z M 5.479554,11.37478 c 1.0130112,0 1.3866172,-1.660997
1.3866172,-2.6252198 0,-0.9653959 -0.373606,-2.6252201 -1.3866172,-2.6252201 -1.0111524,0 -1.386617,1.6609971
-1.386617,2.6252201 0,0.9642228 0.3754646,2.6252198 1.386617,2.6252198 z"
+ inkscape:connector-curvature="0"
+ style="fill:#50b44b;fill-rule:evenodd" /></svg>
\ No newline at end of file
diff --git a/data/theme/gtk-2.0/Buttons/button-rect-default.svg
b/data/theme/gtk-2.0/Buttons/button-rect-default.svg
index 237d46b..68228ed 100644
--- a/data/theme/gtk-2.0/Buttons/button-rect-default.svg
+++ b/data/theme/gtk-2.0/Buttons/button-rect-default.svg
@@ -3,12 +3,10 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="80px" height="40px" viewBox="0 0 80 40" enable-background="new 0 0 80 40"
xml:space="preserve">
+<path fill="#242627" d="M72.346,1H17.795C14.4,1,5.527,12.902,0.539,20.051l-0.578,0.783l0.585,0.601
+
C5.535,28.452,14.408,40,17.796,40h54.552c3.938,0,7.111-2.826,7.111-6.797V8.02C79.458,4.049,76.284,1,72.346,1z"/>
<g>
- <path fill="#3B3B3C"
d="M72.346,3.388H17.795c-1.72,0-8.661,8.907-14.32,16.93c5.663,7.881,12.605,16.247,14.406,16.688
- l54.386-0.046c2.355,0,4.191-1.981,4.191-4.368V7.408C76.458,5.021,74.701,3.388,72.346,3.388z"/>
- <path fill="#242627"
d="M72.346,0.388H17.795C14.4,0.388,5.527,12.291,0.539,19.44l-0.578,0.783l0.585,0.6
-
c4.989,7.018,13.862,18.565,17.25,18.565h54.551c3.938,0,7.112-2.826,7.112-6.796V7.408C79.458,3.438,76.284,0.388,72.346,0.388z
-
M76.458,32.592c0,2.387-1.836,4.33-4.191,4.33l-54.425,0.007c-1.801-0.442-8.723-8.73-14.386-16.611
- c5.659-8.022,12.62-16.93,14.34-16.93h54.551c2.355,0,4.112,1.633,4.112,4.02V32.592z"/>
+ <path fill="#6A6A6A"
d="M72.346,3.388H17.795c-1.72,0-8.661,8.907-14.32,16.93c5.663,7.881,12.605,16.247,14.406,16.688
+ l54.387-0.046c2.354,0,4.19-1.981,4.19-4.368V7.408C76.458,5.021,74.701,3.388,72.346,3.388z"/>
</g>
</svg>
diff --git a/data/theme/gtk-2.0/Buttons/button-rect-prelight.svg
b/data/theme/gtk-2.0/Buttons/button-rect-prelight.svg
index fa4bb4c..d2bef7b 100644
--- a/data/theme/gtk-2.0/Buttons/button-rect-prelight.svg
+++ b/data/theme/gtk-2.0/Buttons/button-rect-prelight.svg
@@ -3,16 +3,15 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="80px" height="40px" viewBox="0 0 80 40" enable-background="new 0 0 80 40"
xml:space="preserve">
+<path fill="#242627" d="M72.346,1H17.795C14.4,1,5.527,12.902,0.539,20.051l-0.578,0.783l0.585,0.601
+
C5.535,28.452,14.408,40,17.796,40h54.552c3.938,0,7.111-2.826,7.111-6.797V8.02C79.458,4.049,76.284,1,72.346,1z"/>
<g>
- <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="39.9663" y1="37.0063" x2="39.9663"
y2="3.3882">
+
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="87.4668" y1="-168.4243"
x2="87.4668" y2="-131.9625" gradientTransform="matrix(1 0 0 -1 -47.5 -130)">
<stop offset="0" style="stop-color:#3B3B3C"/>
<stop offset="1" style="stop-color:#6C6B6C"/>
</linearGradient>
<path fill="url(#SVGID_1_)"
d="M72.346,3.388H17.795c-1.72,0-8.661,8.907-14.32,16.93c5.663,7.881,12.605,16.247,14.406,16.688
- l54.386-0.046c2.355,0,4.191-1.981,4.191-4.368V7.408C76.458,5.021,74.701,3.388,72.346,3.388z"/>
- <path fill="#242627"
d="M72.346,0.388H17.795C14.4,0.388,5.527,12.291,0.539,19.44l-0.578,0.783l0.585,0.6
-
c4.989,7.018,13.862,18.565,17.25,18.565h54.551c3.938,0,7.112-2.826,7.112-6.796V7.408C79.458,3.438,76.284,0.388,72.346,0.388z
-
M76.458,32.592c0,2.387-1.836,4.33-4.191,4.33l-54.425,0.007c-1.801-0.442-8.723-8.73-14.386-16.611
- c5.659-8.022,12.62-16.93,14.34-16.93h54.551c2.355,0,4.112,1.633,4.112,4.02V32.592z"/>
+ l54.387-0.046c2.354,0,4.19-1.981,4.19-4.368V7.408C76.458,5.021,74.701,3.388,72.346,3.388z"/>
</g>
</svg>
diff --git a/data/theme/gtk-2.0/Buttons/button-rect-pressed.svg
b/data/theme/gtk-2.0/Buttons/button-rect-pressed.svg
index 68056f8..14e9e36 100644
--- a/data/theme/gtk-2.0/Buttons/button-rect-pressed.svg
+++ b/data/theme/gtk-2.0/Buttons/button-rect-pressed.svg
@@ -3,12 +3,15 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="80px" height="40px" viewBox="0 0 80 40" enable-background="new 0 0 80 40"
xml:space="preserve">
+<path fill="#242627" d="M72.346,1H17.795C14.4,1,5.527,12.902,0.539,20.051l-0.578,0.783l0.585,0.601
+
C5.535,28.452,14.408,40,17.796,40h54.552c3.938,0,7.111-2.826,7.111-6.797V8.02C79.458,4.049,76.284,1,72.346,1z"/>
<g>
- <path fill="#30302E"
d="M72.346,3.388H17.795c-1.72,0-8.661,8.907-14.32,16.93c5.663,7.881,12.605,16.247,14.406,16.688
- l54.386-0.046c2.355,0,4.191-1.981,4.191-4.368V7.408C76.458,5.021,74.701,3.388,72.346,3.388z"/>
- <path fill="#242627"
d="M72.346,0.388H17.795C14.4,0.388,5.527,12.291,0.539,19.44l-0.578,0.783l0.585,0.6
-
c4.989,7.018,13.862,18.565,17.25,18.565h54.551c3.938,0,7.112-2.826,7.112-6.796V7.408C79.458,3.438,76.284,0.388,72.346,0.388z
-
M76.458,32.592c0,2.387-1.836,4.33-4.191,4.33l-54.425,0.007c-1.801-0.442-8.723-8.73-14.386-16.611
- c5.659-8.022,12.62-16.93,14.34-16.93h54.551c2.355,0,4.112,1.633,4.112,4.02V32.592z"/>
+
+ <radialGradient id="SVGID_1_" cx="87.4668" cy="-150.1973" r="28.4091"
gradientTransform="matrix(1 0 0 -1 -47.5 -130)" gradientUnits="userSpaceOnUse">
+ <stop offset="0" style="stop-color:#4E4E4F"/>
+ <stop offset="1" style="stop-color:#353636"/>
+ </radialGradient>
+ <path fill="url(#SVGID_1_)"
d="M72.346,3.388H17.795c-1.72,0-8.661,8.907-14.32,16.93c5.663,7.881,12.605,16.247,14.406,16.688
+ l54.387-0.046c2.354,0,4.19-1.981,4.19-4.368V7.408C76.458,5.021,74.701,3.388,72.346,3.388z"/>
</g>
</svg>
diff --git a/design/ui/splash.jpg b/design/ui/splash.jpg
new file mode 100644
index 0000000..40c3db5
Binary files /dev/null and b/design/ui/splash.jpg differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]