I think that would be reasonable, or it could be supplied via a setting.  I 
don't know enough about themes to be messing around with them yet so I 
haven't done anything with them so far.  I do plan to have a setting to 
enable the highlighting so no one has to have it if they don't want it.  
Would a highlight color setting work for you, do you think?

On Saturday, August 28, 2021 at 5:14:54 AM UTC-4 jkn wrote:

> I could see this being useful to me, thanks for your work on this (I 
> haven't tested it yet).
>
> Would the eventual intention be to add a configuration colour for this to 
> themes? And (say) only do your 'background colour calculation' if this was 
> missing? That would seem the best approach to me.
>
> Thanks, Jon N
>
>
> On Friday, August 27, 2021 at 10:36:40 PM UTC+1 [email protected] wrote:
>
>> The attached Leo outline contains a script to highlight the line in the 
>> body that has the cursor.  You can activate it by selecting the top-most 
>> node, then pressing CTRL-b.  After this, the cursor line should become 
>> highlighted anywhere in the outline.  Other outlines will not be affected.
>>
>> If you want to try it out in another outline, copy the script, paste it 
>> into the other outline, and run it with CTRL-b.
>>
>> Activating the highlighting this way is a bit strange, but lets you try 
>> it out without needing to modify Leo itself or install a different 
>> version.  Eventually, the code would be included and activated when the 
>> body pane is constructed.
>>
>> I'd like to know how you like the effect, and whether you think the 
>> highlight color works well enough.  
>>
>> Note that the highlight color will be different for different Leo themes 
>> (and no-theme color schemes).  The script tries to calculate reasonable 
>> colors.  If the background is light, the highlight will be the same hue but 
>> darker.  If the background is dark, the highlight will be the same hue but 
>> lighter.  If the background is very light or very dark, different rules may 
>> be applied.
>>
>> I have tried this out on every theme in Leo's theme directory.  The 
>> colors seem to work acceptably to me.  If you have your own theme that 
>> isn't one of the standard ones, I'm especially interested in how that works 
>> out.  And, of course, post here if you notice any bugs or anomalies.
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/af2f47ff-7cc0-461e-ade3-d9424c66b674n%40googlegroups.com.

Reply via email to