On Fri, Jun 1, 2012 at 5:18 AM, Edward K. Ream <[email protected]> wrote:
> Are you saying that 4655 is the first rev that exhibits the problem?
Congratulations. You have indeed found the source of the problem. It
is in leoQtBody.setEditorColors.
There are two Qt bugs here:
1. Setting the stylesheet for the entire QTextBrowser widget sets the
colors for the scrollbars. That is a Qt bug, and is unacceptable
visually. This was the original bug that I attempted to work around
as follows::
if hasattr(obj,'viewport'):
obj = obj.viewport()
2. Setting the foreground and background colors (to black and white)
in the stylesheet for the QTextBrowser's viewport affects the contents
of the viewport. Another Qt bug.
Neither bug is likely directly fixable in Leo itself.
The workaround is simply to disable setEditorColors. This isn't all
that bad: setEditorColors isn't really needed now that Leo supports
focus borders. I have experimented with changing setEditorColors in
various ways, but so far without success.
Actually, I might disable setEditorColors only for Python 3.x. Focus
borders don't seem to work on Python 2.x, so background colors are a
bit more important when using Python 2.x. But this is a bit risky:
I'm not convinced that the bugs never happen with Python 2.x. How
would we know?
Terry, thanks for your excellent sleuthing. Your comments please.
Edward
--
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.