On Tue, Oct 25, 2011 at 9:16 AM, Edward K. Ream <edream...@gmail.com> wrote:
> On Mon, Oct 24, 2011 at 9:14 AM, ne1uno <eltro...@gmail.com> wrote:
>
>> is there any way extra options could be passed onto QApplication(sys.args)?
>
>> it's possible if you would be consulting an @data stylesheet node to 
>> determine what was active, that would no longer be valid, so I guess you 
>> would have to update the internal stylesheet in that case?
>
> A timely set of questions.  Leo will soon do more than what you are
> asking directly.
>
> I had not realized that QApplication dealt with sys.argv.  It would
> indeed be possible to support some of the Qt arguments, especially the
> --stylesheet argument.
>
> Two small notes:
>
> - It would be --stylesheet, not -stylesheet, for compatibility with
> Leo's other arguments.
>
> - Supporting --stylesheet would be a "simulation" in the sense that it
> would not be passed to the QApplication ctor.  But this is entirely a
> behind-the-scenes detail.
>
> There are several ways to generalize the underlying request behind
> your question.
>
> 1. Imo, it is time to consider adding a typical "startup" file to Leo,
> ~/leo_config.py, similar to ~/.emacs or ipython_config.py.  This will
> make Leo "thicker", that is more professional/standard.
>
> IPython adds lots of bells and whistles to configuration.  Leo
> emulates most of them, but .leo_config.py would be a good addition.
> Think of .leo_config.py as a lightweight plugin.
>
> leo_config.py should execute after settings have been parsed, but
> before plugins have been loaded.  If desired, leo_config.py may
> register "start2" event handlers, which execute after all plugins have
> been loaded, just before starting the main Qt event loop.
>
> 2. Leo commands form a good framework for other solutions to Qt
> stylesheet issues.  Consider the following commands::
>
> - qt-stylesheet-set-global-stylesheet
> - qt-stylesheet-append-to-global-stylesheet
> - qt-stylesheet-set-widget-stylesheet
> - qt-stylesheet-append-to-widget-stylesheet
>
> The body text of the presently selected node will contain a Qt
> stylesheet.  Leo can probably check the stylesheet and warn about
> syntax errors.
>
> The "global-stylesheet" commands will set the application stylesheet;
> the "widget-stylesheet" commands would set the stylesheet of the
> selected widget, that is, the widget with focus.
>
> Given the interest in stylesheets, I think all these options are worth
> doing asap.
>
> Your comments, please.

This thread has been over my head, I'm thinking colors, shmolors,
lots of implementation details I don't understand.

However, I just tried Terry's script which cycled colors and realized
that if it was easy to specify different sets of colors it could add greatly
to Leo, at many levels. Color and variations of color (brightness, hue)
are a great way to add another layer of explanation in addition to
providing a pleasant working environment.

I would want a dead simple API though: someone else does the hard
work of figuring out a set of colors, all I need is something like:
<alt-x> color-scheme solarize
and
@settings
 @color-scheme solarize

Extra points if parameters are possible, shifting brightness and hue
<alt-x> color-scheme tropical.bright+2

Thanks,
Kent

>
> Edward
>
> --
> You received this message because you are subscribed to the Google Groups 
> "leo-editor" group.
> To post to this group, send email to leo-editor@googlegroups.com.
> To unsubscribe from this group, send email to 
> leo-editor+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/leo-editor?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to leo-editor@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to