[longomatch/redesign3] Set category colors in tagging buttons



commit f6ab02d5e2a778746aded198aa2dce5dc5903fa7
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Aug 18 02:05:46 2011 +0200

    Set category colors in tagging buttons

 LongoMatch/Gui/Component/ButtonsWidget.cs |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch/Gui/Component/ButtonsWidget.cs b/LongoMatch/Gui/Component/ButtonsWidget.cs
index 9b033f4..36cf9a2 100644
--- a/LongoMatch/Gui/Component/ButtonsWidget.cs
+++ b/LongoMatch/Gui/Component/ButtonsWidget.cs
@@ -85,7 +85,12 @@ namespace LongoMatch.Gui.Component
 					uint col_left = (uint) i%table1.NColumns;
 					uint col_right = (uint) col_left+1 ;
 
-					l.Markup = cat.Name;
+					string colorString = String.Format("#{0:X4}{1:X4}{2:X4}",
+					                                   cat.Color.Red,
+					                                   cat.Color.Green,
+					                                   cat.Color.Blue);
+					l.Markup = String.Format("<span foreground=\"{0}\">{1}</span>", 
+					                         colorString, cat.Name);
 					l.Justify = Justification.Center;
 					l.Ellipsize = Pango.EllipsizeMode.Middle;
 					l.CanFocus = false;



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