Hi Terry, thanks for your reply
On Monday, January 12, 2015 at 3:20:00 PM UTC, Terry Brown wrote:
>
> On Mon, 12 Jan 2015 07:48:17 -0600
> "Edward K. Ream" <[email protected] <javascript:>> wrote:
>
> > ​Probably not, as it looks like it can be done in a custom style
> > sheet.
>
> I.e. custom Qt styling that can be placed in the node
> @settings-->@data qt-gui-user-style-sheet in you myLeoSettings.leo
> e.g. adding
>
> QTreeView::item:has-children { color: red; }
> QTreeView::item:open { background: pink; }
>
> to that node will make nodes with children have red text and expanded
> nodes have pink backgrounds.
>
Yes, following Edwards pointers I have been experimenting with similar
things.
>
> But I don't see a state selector to identify top level nodes, which is
> what I think jkn wants to style.
That is right - and from what I can see the QTreeView selectors are acting
on the *appearance* of the tree,
not the actual structure.
> In HTML CSS you could just do
> something like
>
> QTreeView > QTreeView::item { style } or
> QTreeView > QTreeWidget { style }
>
> to target direct descendants, but that doesn't seem to work for Qt.
>
> I've threatened many times to add a node styling callback / hook so
> that every node would call g.app.gui.get_node_style(p) or something
> like that, but it hasn't happened yet :-/
>
Oh, go on... ;-/
Regards
Jon N
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.