[longomatch] Use palette color for Offset label.



commit e0b293eb85d6318a7f1fd8a7e11ec1783f35f5b0
Author: Julien Moutte <julien fluendo com>
Date:   Mon Mar 16 16:20:19 2015 +0100

    Use palette color for Offset label.

 LongoMatch.GUI/Gui/Component/VideoFileInfo.cs      |   19 ++++++++++---------
 .../LongoMatch.Gui.Component.VideoFileInfo.cs      |    1 +
 LongoMatch.GUI/gtk-gui/gui.stetic                  |    1 +
 3 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/VideoFileInfo.cs b/LongoMatch.GUI/Gui/Component/VideoFileInfo.cs
index a2af25b..edeba8e 100644
--- a/LongoMatch.GUI/Gui/Component/VideoFileInfo.cs
+++ b/LongoMatch.GUI/Gui/Component/VideoFileInfo.cs
@@ -25,7 +25,7 @@ using Gtk;
 
 namespace LongoMatch.Gui.Component
 {
-       [System.ComponentModel.ToolboxItem(true)]
+       [System.ComponentModel.ToolboxItem (true)]
        public partial class VideoFileInfo : Gtk.Bin
        {
                public event EventHandler Changed;
@@ -33,7 +33,7 @@ namespace LongoMatch.Gui.Component
                MediaFileSet fileSet;
                MediaFile mediaFile;
                bool disableChanges;
-               
+
                public VideoFileInfo ()
                {
                        this.Build ();
@@ -78,22 +78,23 @@ namespace LongoMatch.Gui.Component
                        }
                        if (mediaFile.Duration != null) {
                                durationlabel.Text = String.Format ("{0}: {1}", Catalog.GetString 
("Duration"),
-                                                                   mediaFile.Duration.ToSecondsString ());
+                                       mediaFile.Duration.ToSecondsString ());
                        } else {
                                durationlabel.Text = Catalog.GetString ("Missing duration info, reload this 
file.");
                        }
                        formatlabel.Text = String.Format ("{0}: {1}x{2} {3}fps", Catalog.GetString ("Format"),
-                                                         mediaFile.VideoWidth, mediaFile.VideoHeight, 
mediaFile.Fps);
+                               mediaFile.VideoWidth, mediaFile.VideoHeight, mediaFile.Fps);
                        videolabel.Text = String.Format ("{0}: {1}", Catalog.GetString ("Video codec"),
-                                                        mediaFile.VideoCodec);
+                               mediaFile.VideoCodec);
                        audiolabel.Text = String.Format ("{0}: {1}", Catalog.GetString ("Audio codec"),
-                                                        mediaFile.AudioCodec);
+                               mediaFile.AudioCodec);
                        containerlabel.Text = String.Format ("{0}: {1}", Catalog.GetString ("Container"),
-                                                            mediaFile.Container);
-                       offsetlabel.Text = String.Format ("{0}: {1}", Catalog.GetString ("Offset"),
+                               mediaFile.Container);
+                       offsetlabel.Markup = String.Format ("<span foreground=\"{0}\">{1}: {2}</span>",
+                               Config.Style.PaletteActive.ToRGBString (false), Catalog.GetString ("Offset"),
                                mediaFile.Offset.ToMSecondsString ());
                }
-               
+
                void HandleButtonPressEvent (object o, Gtk.ButtonPressEventArgs args)
                {
                        if (args.Event.Button != 1 || disableChanges) {
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.VideoFileInfo.cs 
b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.VideoFileInfo.cs
index fa1a338..bda32aa 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.VideoFileInfo.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.VideoFileInfo.cs
@@ -129,6 +129,7 @@ namespace LongoMatch.Gui.Component
                        this.offsetlabel = new global::Gtk.Label ();
                        this.offsetlabel.Name = "offsetlabel";
                        this.offsetlabel.Xalign = 0F;
+                       this.offsetlabel.UseMarkup = true;
                        this.table1.Add (this.offsetlabel);
                        global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table1 
[this.offsetlabel]));
                        w8.TopAttach = ((uint)(1));
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 4efda4b..a9e70cd 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -11531,6 +11531,7 @@ To avoid this, and to enjoy many additional functional benefits, we encourage yo
                       <widget class="Gtk.Label" id="offsetlabel">
                         <property name="MemberName" />
                         <property name="Xalign">0</property>
+                        <property name="UseMarkup">True</property>
                       </widget>
                       <packing>
                         <property name="TopAttach">1</property>


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