​
On Tue, Mar 6, 2018 at 8:32 AM, Terry Brown <[email protected]> wrote:

Although even better:
>
>       @color log_info_color = @solarized-blue
>       @color log_error_color = @solarized-red
>

​I'll use log_ instead of es_ as you prefer.

It just won't work to use info/error instead of blue/red, for several 
​reasons.

1. I omitted a crucial "etc."  We need settings for all the common 
tk/solarized colors: red, blue, yellow, green. Iirc, Leo's core only uses 
blue and red, but mod_http uses purple and we might as well give the entire 
range of (at least) solarized names.

2. Using error/info would be just plain wrong. Error and info mean *nothing* 
in Leo. Yes, various error/warning/info methods exist, but they use 
tk/solarized colors, and it is *those* colors that we have to redirect.

Anyway, LeoQtLog.put must be extended.  It presently contains this:

if color:
     color = leoColor.getColor(color, 'black')
else:
     color = leoColor.getColor('black')

We must translate this "preliminary color" using the new settings by adding 
something like this (untested):

d = {
    'black': 'log_black_color',
    'red': 'log_red_color',
    ... # etc.!
}
setting = d.get(color)
if setting:
    color2 = c.config.getColor(setting)
    if color2:
        color = leoColor.getColor(color, color)

I am about to summarize our recent discussions in a new thread.  As always, 
they have been fruitful.

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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to