On Saturday, September 13, 2014 11:19:14 AM UTC-5, Edward K. Ream wrote: > The acid test will be actually changing settings.
For testing, I created a way to replace the (global) stylesheet with the contents of any body node. This shows that stylesheet settings revert to Qt defaults unless they are again set. There seems to be *no* way to check the validity of a Qt style sheet. This is a severe annoyance. Comparing w.styleSheet() to the value passed to w.setStyleSheet() looks like a completely useless test. It won't detect, for example, missing semicolons, bad selector values or much of anything else. Googling shows no other solutions. Happily, the "fully parametrized" scheme should allow almost all users to modify Leo's appearance without *ever* touching stylesheets, and without ever defining their own qt-gui-user-style-sheet. g.expand_css_constants already appears to handle all the complexities in @-value substitutions, up to 10-levels of indirection! But you, Terry, knew that ;-) It would be a clumsy to make g.expand_css_constants a method of the StyleSheetManager class, but as I write this I see that g.expand_css_constants should just instantiate a StyleSheetManager and call the corresponding SSM method. I'll do this today. Several LeoQtGui wrapper methods already do something similar. Important: tracing reveals that Leo only sets the stylesheet for the so-called master widget, the widget returned by ssm.get_master_widget. That's an important implicit invariant that simplifies matters. Now that all these details have been resolved, I have hopes of completing the project today. The only remaining task: transition to fully-parametrized stylesheets. 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]. 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.
