[chronojump] bold print AVG and SD values on encoder analyze table. WIP



commit 4f9f3aba56585bb5bb20d082a4ab2dc79c2a3c7c
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Nov 2 14:45:24 2015 +0100

    bold print AVG and SD values on encoder analyze table. WIP

 src/gui/encoderTreeviews.cs |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/encoderTreeviews.cs b/src/gui/encoderTreeviews.cs
index b68d07d..6934dd4 100644
--- a/src/gui/encoderTreeviews.cs
+++ b/src/gui/encoderTreeviews.cs
@@ -889,9 +889,9 @@ public partial class ChronoJumpWindow
        private void RenderNAnalyze (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, 
Gtk.TreeIter iter)
        {
                EncoderCurve curve = (EncoderCurve) model.GetValue (iter, 0);
-
+                       
                if(curve.N == "AVG" || curve.N == "SD") {
-                       (cell as Gtk.CellRendererText).Text = curve.N;
+                       (cell as Gtk.CellRendererText).Markup = "<b>" + curve.N + "</b>";
                        return;
                }
                
@@ -951,8 +951,13 @@ public partial class ChronoJumpWindow
        private void RenderExtraWeight (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel 
model, Gtk.TreeIter iter)
        {
                EncoderCurve curve = (EncoderCurve) model.GetValue (iter, 0);
-               (cell as Gtk.CellRendererText).Text = 
-                       
String.Format(UtilGtk.TVNumPrint(curve.ExtraWeight.ToString(),3,0),Convert.ToInt32(curve.ExtraWeight));
+
+               string str = 
String.Format(UtilGtk.TVNumPrint(curve.ExtraWeight.ToString(),3,0),Convert.ToInt32(curve.ExtraWeight));
+               
+               if(curve.N == "AVG" || curve.N == "SD")
+                       (cell as Gtk.CellRendererText).Markup = "<b>" + str + "</b>";
+               else
+                       (cell as Gtk.CellRendererText).Text = str;
        }
 
        private void RenderDisplacedWeight (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel 
model, Gtk.TreeIter iter)


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