May be some minibuffer command to preview and apply themes should be a
newbie friendly solution (or a notebook that does that via nodes).
Cheers,
Offray
On 03/03/17 10:20, john lunzer wrote:
From a newbie's perspective I like the idea of themes being centrally
located in their own .leo file and having a button from that separate
file to copy a specific theme to myLeoSettings.leo without having to
open or fiddle around in myLeoSettings.leo. I think that level of
separation will help simplify "themes" for new users.
From the perspective of a more experience user, I make a lot of
changes to my theme in myLeoSettings.leo and there is a button in the
theme itself named "reload-styles" which I have to run after a change
(and then restart Leo). At this point I'm uncertain what the
recommended method of customizing a theme will be with the new changes.
On Friday, March 3, 2017 at 9:50:23 AM UTC-5, Edward K. Ream wrote:
I am writing this here, rather than in #350: themes not working as
documented <https://github.com/leo-editor/leo-editor/issues/350>,
so that more people will see this discussion. Anyone who wants to
use themes will want to read the following carefully.
*Background*
I have download all final versions of Leo from 4.11 onward to 5.4.
The /only /difference between 4.11 and all later versions is that
from 5.0 onward there is that there is a separate *themes.leo*
file in the leo/config folder. All themes.leo files contain
separate *theme scripts *(a script, *not* an @button node), for
each separate theme. Afaik, there has never been a button that
creates themes.
From September 2014 onward, Leo has had a StyleSheetManager class,
accessed via c.styleSheetManager. All theme scripts reference
g.expand_css_constants, but that no longer exists. Instead,
scripts should call c.styleSheetManager.expand_css_constants. When
that is done, theme script create @data qt-gui-plugin-style-sheet
node as advertised.
However, making that stylesheet active by calling:
g.app.gui.frameFactory.masterFrame.setStyleSheet(
c.styleSheetManager.expand_css_constants(nd.b))
does not (yet) produce the desired theme. It's probably no big
deal, but the effect is unsettling. The appearance of themes.leo
changes drastically, at least with my defaults.
*Proposed changes*
1. Replace all theme /scripts /in themes.leo by a /single /@button
node at the top level. The user should select the desired *theme
tree* before running the @button script (clicking the button). The
@button script will ensure that the user has, in fact, selected a
theme tree. It may be convenient to mark "the good parts" with @theme.
2. *Aside*: I had to change @language css to @language python in
order to run the theme script. No big deal, but it will be best
to create an organizer node for the rest of the data nodes that
contains nothing but @language css. This reorganization may
affect the theme script, but any required changes will be worth
the cost--it's intolerable not to color text correctly.
2. A separate top-level @button script will copy theme data to
myLeoSettings.leo.
*Summary*
The themes data and scripts moved from leoSettings.leo to
themes.leo for Leo 5.0 and have remained largely (completely?)
unchanged ever since.
A refactoring of Leo's code broke the scripts in themes.leo ca.
September, 2014.
An @button node in themes.leo will generate theme data. A separate
@button node will copy theme data to myLeoSettings.leo.
Much of the confusion re #350 stems from out-of-date docs. I'll
update the docs in leoSettings.leo, themes.leo and on Leo's web
site once all the details become clear.
Comments, corrections and questions, please.
Edward
--
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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.
--
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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.