fixed colouring on highlighted text for rspec viewer. Next: a good sizeHint
[sface.git] / 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)