fixed colouring on highlighted text for rspec viewer. Next: a good sizeHint
authorGiovanni Gherdovich <ggherdov@brentaal.inria.fr>
Tue, 19 Oct 2010 16:17:30 +0000 (18:17 +0200)
committerGiovanni Gherdovich <ggherdov@brentaal.inria.fr>
Tue, 19 Oct 2010 16:17:30 +0000 (18:17 +0200)
sface/xmlwidget.py

index b24de60..865f276 100644 (file)
@@ -271,7 +271,7 @@ class ElemNodeDelegate(QAbstractItemDelegate):
                     tmp = att.split('=')
                     attName = tmp[0]
                     attValue = tmp[1][1:-1]
-                    AttListHtml += (nonHighAttPattern % (attName, attValue))
+                    AttListHtml += (attPattern % (attName, attValue))
             html = (globPattern % (elemName, AttListHtml))
             return html
         def colorize(color, text):
@@ -281,6 +281,8 @@ class ElemNodeDelegate(QAbstractItemDelegate):
         if option.state & QStyle.State_Selected:
             htmlText = colorize(palette.highlightedText().color().name(),
                                 getHtmlText(text, highGlobPattern, highAttPattern))
+            print htmlText
+            print getHtmlText(text, highGlobPattern, highAttPattern)
             document.setHtml(QString(htmlText))
         else:
             htmlText = getHtmlText(text, nonHighGlobPattern, nonHighAttPattern)