Here's an amusing hack to test the speed of Qt styling code
import re
flippy = re.compile(r"#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})")
sheet = str(c.frame.top.leo_ui.styleSheet())
sheet = re.sub('(?i)white', '#ffffcc', sheet)
sheet = re.sub('(?i)#ffffff', '#ffccff', sheet)
for i in range(10):
sheet = flippy.sub(r'#\3\1\2', sheet)
c.frame.top.leo_ui.setStyleSheet(sheet)
copy it into a node and run it repeatedly. That's how fast Qt can
apply Leo's current stylesheet 10 times.
It cycles RGB to BRG repeatedly, so running it three times, 30 cycles,
brings you back to where you started, except that first it perturbs
white colors slightly, because RGB #ffffff moved to BRG is still
#ffffff.
I see a slight delay doing it 10 times, but of course it only needs to
be done once.
Cheers -Terry
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.