git://git.onelab.eu
/
sface.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9c27ebe
)
fixed colouring on highlighted text for rspec viewer. Next: a good sizeHint
author
Giovanni Gherdovich
<ggherdov@brentaal.inria.fr>
Tue, 19 Oct 2010 16:17:30 +0000
(18:17 +0200)
committer
Giovanni Gherdovich
<ggherdov@brentaal.inria.fr>
Tue, 19 Oct 2010 16:17:30 +0000
(18:17 +0200)
sface/xmlwidget.py
patch
|
blob
|
history
diff --git
a/sface/xmlwidget.py
b/sface/xmlwidget.py
index
b24de60
..
865f276
100644
(file)
--- a/
sface/xmlwidget.py
+++ b/
sface/xmlwidget.py
@@
-271,7
+271,7
@@
class ElemNodeDelegate(QAbstractItemDelegate):
tmp = att.split('=')
attName = tmp[0]
attValue = tmp[1][1:-1]
tmp = att.split('=')
attName = tmp[0]
attValue = tmp[1][1:-1]
- AttListHtml += (
nonHighA
ttPattern % (attName, attValue))
+ AttListHtml += (
a
ttPattern % (attName, attValue))
html = (globPattern % (elemName, AttListHtml))
return html
def colorize(color, text):
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))
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)
document.setHtml(QString(htmlText))
else:
htmlText = getHtmlText(text, nonHighGlobPattern, nonHighAttPattern)