On Sun, 23 Oct 2011 15:20:27 -0700 (PDT)
"Edward K. Ream" <[email protected]> wrote:
> On the minus side, syntax errors can invalidate a *lot* of (all?) user
> preferences. Furthermore, Terry's kludge is pretty ugly at the code
> level. Some significant part of me prefers individual Leo settings to
> one large stylesheet.
Seems the first question, do we expect Leo users to use CSS like Qt
Style language, or provide @settings. For seems like at least two
years we've expected the stylesheet to be edited to change fonts or
whatever. My feeling is that people who are likely to use Leo, which
requires editing a text file to select plugins :-), can probably handle
/* border for selected pane */
*[style_class~='focused_pane'] { border-width: 2; border-color: red; }
> However, a stylesheet utility, say qtGui.replaceStylesheet, might be
> able to handle many such on-the-fly changes
Right, unfortunately Qt allows only a single stylesheet at a
particularly level, and dinking around binding different sheets at
different level seems too complicated.
But I think we can easily make one sheet aggregate a bunch of separate
sheets with sentinels in the text of the sheet:
/* LEO_SS_START: name of sheet %/
<stylesheet text here>
/* LEO_SS_END */
then g.app.gui.setStyleSheetPart('name of sheet', my_styles)
etc. etc. So we wouldn't write one huge stylesheet with sentinels in
it, but programatically construct the sheet using sentinels to keep
track of what bits come from where so they can be changed as needed.
Even manipulating the ordering of the parts wouldn't be too hard.
Ville has way more experience in this area than anyone else here, I'm
sure, so his opinion will be interesting.
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.