On Thu, 27 Oct 2011 11:53:45 +0300
"Ville M. Vainio" <vivai...@gmail.com> wrote:

> Currently, you get the red rectangle around focused widget.

I have just got some code, not pushed yet, to work which in theory can
use a single master style sheet for all styling.  It uses
a QObject property ('style_class') set to a QListString to allow CSS
like class behavior (i.e. arbitrary multiple 'classes' per widget), and
is working as an alternate implementation of the border focus
highlighting.

So Edward's style sheet might read:

*[style_class~=['focused_pane'] { border-color: red; }
*[style_class~=['unfocused_pane'] { border-color: white; }

and yours might read:

*#tabpane[style_class~=['focused_pane'], 
*#treepane[style_class~=['focused_pane'] {
    border-color: red; }
*#tabpane[style_class~=['unfocused_pane'], 
*#treepane[style_class~=['unfocused_pane'] {
    border-color: white; }

two color only those two.

code wise the focus events do

    w.add_sclass('focused_pane')
    w.remove_sclass('unfocused_pane')

or the opposite, where those are simple functions for
QObect.property('style_class') manipulations, monkey patched into
QWidget for convenience.

What do you think of this approach overall?

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 leo-editor@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to