On Tue, Sep 16, 2014 at 7:19 PM, 'Terry Brown' via leo-editor <leo-editor@googlegroups.com> wrote: > On Tue, 16 Sep 2014 17:06:11 -0700 (PDT) > "Edward K. Ream" <edream...@gmail.com> wrote: > >> Imo, it's time to simplify how themes get specified, but we'll have >> to discuss this... > > A @theme node, perhaps? :-)
Yes! Good idea. I know from reading the old "reload" code that it searched for themes first, and searched for @data qt-gui-plugin-style-sheet nodes only if no stylesheet & source node is found. I would like to avoid such logic. Happily now that the @data qt-gui-plugin-style-sheet is fully parameterized, we should only ever need one copy of it. The theme will simply provide all the settings that modify this style sheet. Themes should use the new style sheet: otherwise there will be *two* sets of style-sheet-related settings floating around, and that will really cause confusion. So, imo, themes should be defined in terms of the new settings (and @value) names, not in terms of old @value names. Themes could use a new style sheet, say @data qt-gui-theme-style-sheet, for selectors not found in @data qt-gui-plugin-style-sheet. However, I would rather avoid yet another style sheet if possible. If @data qt-gui-theme-style-sheet contained just a few selectors they could be made part of the standard @data qt-gui-plugin-style-sheet. My first draft of this reply worried about redundant theme-related settings, but that's not a big issue because the settings will be copied to myLeoSettings.leo, *not* leoSettings.leo. Still, the user will have to take care to remove all existing gui-related settings when installing a theme. That should not be too difficult. BTW, I don't remember which settings take effect when there are duplicates--the first or the last. Either way will cause troubles for some users--far simpler if they remove any potential duplicates. In short, copying an @theme node to myLeoSettings.leo, with all its inner @color, @font and @string nodes, should be be the first step when installing a new theme. If necessary, an install-theme command would complete the installation, perhaps with an associated button. Install-theme would search for a *unique* @theme node in the @setting tree, and refuse to continue if there are several. These are just my first impressions. Your comments, 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 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/d/optout.