[chronojump] Fixed some color problem on recent commits



commit 6b8898725272eccd2e24893c5c00c48b115e87dc
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Mar 25 00:25:17 2020 +0100

    Fixed some color problem on recent commits

 src/utilGtk.cs | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index a646bb41..c1490ce1 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -759,6 +759,7 @@ public class UtilGtk
        public static string ColorToColorString (Gdk.Color color)
        {
                string str = color.ToString(); //returns this: rgb:8b8b/6969/1414 or this: rgb:ffff/a5a5/0 
(if blue is 0)
+               LogB.Information("str at ColorToColorString: " + str);
                Match match = Regex.Match(str, @"rgb:(\w+)/(\w+)/(\w+)");
                LogB.Information("ColorToColorString match groups: " + match.Groups.Count.ToString());
                if(match.Groups.Count == 4)
@@ -774,6 +775,8 @@ public class UtilGtk
                        return colorString + colorString;
                if(colorString.Length == 2) //if "ce" return "ce"
                        return colorString;
+               if(colorString.Length == 3) //if "0e0" return "0e"
+                       return colorString.Substring(1,2);
                if(colorString.Length == 4) //if "cece" return "ce")
                        return colorString.Substring(0,2);
 


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