On Sun, 17 Nov 2013 14:40:01 -0800 (PST)
jquil...@gmail.com wrote:

> On Sunday, November 17, 2013 11:28:17 PM UTC+1, Terry wrote:
> 
> How did you create your myLeoSettings.leo?   
> >
> > For what I think you're trying to do, you should have started with an 
> > empty file, made a @settings node in it, and copied the 
> > 'leo_dark theme 0 settings' node from leoSettings.leo under the 
> > @settings node you created. 
> >
> 
> That's exactly what I did.
>  
> 
> >
> > Assuming that's what you did, which settings are you seeing duplicated? 
> >
> >
> I have just realized that the settings in the the @data 
> qt-gui-plugin-style-sheet node are automatically generated by the script in 
> the "stylesheet & source" node, based on the settings stored in the 
> children nodes. Initially, I had been changing the settings in the children 
> node, not caring much about the @data qt-gui-plugin-style-sheet node, which 
> still retained the old values. Now, I know about it (and I have 
> successfully generated it via the script), but still I don't understand 
> what is the need for it, since those settings were already stored in the 
> other nodes?! Clearly, I am missing something.

Well, not a lot.  An additional point to note is that running the
script renames any @data nodes amongst its children to @@data to
disable them, before generating the new @data node.

The two stage process is for a couple of reasons, historical, in that
Leo originally just uses one big text node you edited by hand, and
speed, in that collapsing the node tree into a single piece of text
(required for the call Qt's .setStyleSheet() method) and performing the
substitutions might take long enough to be annoying, if it was being
done a lot at run time, as opposed to once at edit time.

Interesting thought though, seeing .setStyleSheet() is called very
rarely (no reason for it to be called more than once per window) it
might make sense to avoid the @data node pre-compiled form, if it
doesn't slow things down to much.  Worth trying.

Cheers -Terry

> > Also, for future reference, which OS are you using? 
> >
> 
> Windows 8.1
>  
> Please, Terry, do weed out the redundant parts. Maybe restructuring the 
> settings tree would also improve things.
> 
> 

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to