Re: Leo Themes - Tweaks and Comparisons

2023-02-27 Thread Thomas Passin
Looking at the images I just posted, they all have a slight lack of 
sharpness.  It must be something about resizing done by Google Groups, 
because the originals look sharper.

On Monday, February 27, 2023 at 9:18:45 PM UTC-5 Thomas Passin wrote:

> From time to time I revisit Leo's color themes.  It's not my idea of fun, 
> but sometimes I can make Leo a little more pleasant to work with by some 
> adjustments.
>
> I have just adjusted a few of my themes and added a new one, *tbp_light*, 
> which is basically a mildly adjusted solarized light theme.  The new theme 
> and the adjusted old ones are now in the devel branch. The *tbp_dark *and 
> *tbp_light* ones now have a bit more contrast between text color and 
> background.
>
> All of the five themes of mine in Leo's theme directory have "tbp" in 
> their names. One of their main features is that most of the elements use 
> what I call a "UI" font - that is, a non-monospaced font - that is easier 
> to read and more compact than the usual monospaced font used for the body 
> and log panes.  That works well for the tree pane, for example.
>
> Just now I prefer the *tbp_dark* theme, but that can change from time to 
> time.
>
> To make it easier for folks to look at and assess the various themes, I 
> have taken screen shots of most of them.  I have attached 11 of them to 
> this post.  Some of them have very large font sizes;  they must have been 
> developed by people who have more pixels than I.  One of them, *swotLight*, 
> does not use a mono-spaced font for the body, so I can't recommend it if 
> you plan to do programming.  I am working on a variant that will be better 
> for programming, and fixes a few problems this theme has.  If I like the 
> results, I'll post about it here.
>
> It's pretty easy to change the font sizes so don't despair if a theme you 
> like has the wrong size font for you.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/94394a3a-ecce-422a-8bc0-3e462bcc2368n%40googlegroups.com.


Re: Utility Method To Rescale Sizes In Stylesheets and Themes

2022-03-11 Thread tbp1...@gmail.com
Oops, the new method is named *rescale_sizes()* - a last-minute change - as 
correctly shown in my code example.  The PR has just been approved, so it 
should be in the latest version of the devel branch.

On Friday, March 11, 2022 at 12:10:44 AM UTC-5 tbp1...@gmail.com wrote:

> I have just submitted a PR for a new method to be added to Leo's 
> Stylesheet Manager  (g.app.gui.styleSheetManagerClass).  The new method 
> is named *rescale_fonts() *and it lets you easily rescale all the sizes 
> in a CSS stylesheet  or a Leo theme outline.  It rescales logical sizes 
> (like @string font-family-base = 10.6pt) and physical sizes (like font-size: 
> 10.6pt;)
>
> The background is that I have been struggling with coming up with a theme 
> that works on a small tablet I have.  I couldn't get it to be usable, and I 
> got tired of trying to hand-edit all those logical font-sizes, like 
> @font-family-basic 
> = 10.6pt.  Also, there are many other sizes that are not usually given 
> logical names, like the various paddings and margins that also need to be 
> changed.
>
> At the same time, I was becoming aware that my two plugins, VR3 and 
> Freewin, as well as a new thing I'm working on, don't adjust to changes in 
> theme font size, and I was wondering how to make them adapt more 
> automatically.  And I found that some of the standard plugins that I depend 
> on all the time, like the Find and Nav tabs, also don't scale with the 
> theme sizes.  How to fix all that?
>
> So I wrote a script that uses a regular expression to find all the size 
> instances in pt or px and resize them by a specified factor.  Non-integer 
> sizes are allowed (since I use them in places). Qt and browsers honor point 
> sizes to at least .5pt granularity, and possibly finer.  I'm not sure what 
> will happen for a size in fractional px, like 1.5px.  Presumably  the 
> nearest integer will be used, but it remains to be seen.  If necessary, I 
> could adapt the method to avoid fractional px values - that would be easy.
>
> Once I had this script, I thought that it could be useful to others, 
> especially plugin developers, and that the obvious home for it would be as 
> a new method on the style sheet manager. After all, the SSM already has a 
> node for "Computations on stylesheets themselves".
>
> Using the method to rescale a theme or stylesheet is this easy:
>
> # Input "theme" is a theme or css string
> SCALE = 1.25
> ssm = g.app.gui.styleSheetManagerClass(c)
> rescaled = ssm.rescale_sizes(theme, SCALE)
> # Save to a new theme file if desired, or load the 
> # changed stylesheet back into the master widget, etc.
>
> Assuming that @Edward agrees, the new method should show up on the devel 
> branch soon.  The PR is at Add new utility method to Qt styleSheetManager 
> class: rescale 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/19534e3a-82c2-43ce-9462-bc0a9918cba5n%40googlegroups.com.


Utility Method To Rescale Sizes In Stylesheets and Themes

2022-03-10 Thread tbp1...@gmail.com
I have just submitted a PR for a new method to be added to Leo's Stylesheet 
Manager  (g.app.gui.styleSheetManagerClass).  The new method is named 
*rescale_fonts() *and it lets you easily rescale all the sizes in a CSS 
stylesheet  or a Leo theme outline.  It rescales logical sizes (like @string 
font-family-base = 10.6pt) and physical sizes (like font-size: 10.6pt;)

The background is that I have been struggling with coming up with a theme 
that works on a small tablet I have.  I couldn't get it to be usable, and I 
got tired of trying to hand-edit all those logical font-sizes, like 
@font-family-basic 
= 10.6pt.  Also, there are many other sizes that are not usually given 
logical names, like the various paddings and margins that also need to be 
changed.

At the same time, I was becoming aware that my two plugins, VR3 and 
Freewin, as well as a new thing I'm working on, don't adjust to changes in 
theme font size, and I was wondering how to make them adapt more 
automatically.  And I found that some of the standard plugins that I depend 
on all the time, like the Find and Nav tabs, also don't scale with the 
theme sizes.  How to fix all that?

So I wrote a script that uses a regular expression to find all the size 
instances in pt or px and resize them by a specified factor.  Non-integer 
sizes are allowed (since I use them in places). Qt and browsers honor point 
sizes to at least .5pt granularity, and possibly finer.  I'm not sure what 
will happen for a size in fractional px, like 1.5px.  Presumably  the 
nearest integer will be used, but it remains to be seen.  If necessary, I 
could adapt the method to avoid fractional px values - that would be easy.

Once I had this script, I thought that it could be useful to others, 
especially plugin developers, and that the obvious home for it would be as 
a new method on the style sheet manager. After all, the SSM already has a 
node for "Computations on stylesheets themselves".

Using the method to rescale a theme or stylesheet is this easy:

# Input "theme" is a theme or css string
SCALE = 1.25
ssm = g.app.gui.styleSheetManagerClass(c)
rescaled = ssm.rescale_sizes(theme, SCALE)
# Save to a new theme file if desired, or load the 
# changed stylesheet back into the master widget, etc.

Assuming that @Edward agrees, the new method should show up on the devel 
branch soon.  The PR is at Add new utility method to Qt styleSheetManager 
class: rescale 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/003a9df2-80d3-461d-a39d-3535c562f6ffn%40googlegroups.com.


Re: Color Themes for Windows Console

2021-07-13 Thread tbp1...@gmail.com
Here's a doskey macro to set a console to solarized dark (the Colortool 
directory is in c:\utility) (all on one line):

doskey solardark=C:\utility\ColorTool\ColorTool.exe 
C:\utility\ColorTool\schemes\solarized_dark.itermcolors ^& cls

If you haven't used the doskey command before,  I keep the aliases (called 
"macros") in a batch file called *aliases.cmd*.  I usually start a console 
with the command cmd /k aliases.  This loads all the aliases.  One of mine 
is named *ea *(*E*dit *A*liases) and it loads the aliases into my text 
editor so I can easily add a new one.

With this scheme, you can open a console, type solardark, and you are ready 
to go.  Or you can just use a pair of batch files.

On Wednesday, July 14, 2021 at 12:17:02 AM UTC-4 tbp1...@gmail.com wrote:

> Hmm, I thought that all console windows would use the new scheme, but 
> maybe not.  You might have to invoke the command for each one.  That 
> shouldn't be very hard - a batch file or doskey command would do it.
>
> On Wednesday, July 14, 2021 at 12:14:34 AM UTC-4 tbp1...@gmail.com wrote:
>
>> Now that I've been using the new solarized themes for Leo, I wanted to 
>> use them for the Windows console, too.  It turns out that the Windows 
>> terminal group has developed a tool to set other color themes for the 
>> console.  There is a link on this page:
>>
>> ColorTool 
>> <https://github.com/microsoft/terminal/tree/main/src/tools/ColorTool>
>>
>> You unzip the zip file.  There will be the colortool executable and a 
>> schemes folder with some color schemes, including a light and dark 
>> solarized scheme.  These are the real thing, using the real published 
>> solarized colors.
>>
>> You run the tool with the name of the scheme, e.g.
>>
>> ColorTool.exe schemes\solarized_dark.itermcolors
>>
>> You will get a window with a whole lot of colors.  Don't worry, it is 
>> only showing the various colors it uses.  You can clear the screen with the 
>> cls command if you like.
>>
>> The new color scheme will stick until you set a new one or change some 
>> color(s) in the Properties dialog.
>>
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/3a193f1a-d8c6-423a-8b74-2f246733c604n%40googlegroups.com.


Re: Color Themes for Windows Console

2021-07-13 Thread tbp1...@gmail.com
Hmm, I thought that all console windows would use the new scheme, but maybe 
not.  You might have to invoke the command for each one.  That shouldn't be 
very hard - a batch file or doskey command would do it.

On Wednesday, July 14, 2021 at 12:14:34 AM UTC-4 tbp1...@gmail.com wrote:

> Now that I've been using the new solarized themes for Leo, I wanted to use 
> them for the Windows console, too.  It turns out that the Windows terminal 
> group has developed a tool to set other color themes for the console.  
> There is a link on this page:
>
> ColorTool 
> <https://github.com/microsoft/terminal/tree/main/src/tools/ColorTool>
>
> You unzip the zip file.  There will be the colortool executable and a 
> schemes folder with some color schemes, including a light and dark 
> solarized scheme.  These are the real thing, using the real published 
> solarized colors.
>
> You run the tool with the name of the scheme, e.g.
>
> ColorTool.exe schemes\solarized_dark.itermcolors
>
> You will get a window with a whole lot of colors.  Don't worry, it is only 
> showing the various colors it uses.  You can clear the screen with the cls 
> command if you like.
>
> The new color scheme will stick until you set a new one or change some 
> color(s) in the Properties dialog.
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/2af19857-efe5-4e7b-9938-2708e374553an%40googlegroups.com.


Color Themes for Windows Console

2021-07-13 Thread tbp1...@gmail.com
Now that I've been using the new solarized themes for Leo, I wanted to use 
them for the Windows console, too.  It turns out that the Windows terminal 
group has developed a tool to set other color themes for the console.  
There is a link on this page:

ColorTool 
<https://github.com/microsoft/terminal/tree/main/src/tools/ColorTool>

You unzip the zip file.  There will be the colortool executable and a 
schemes folder with some color schemes, including a light and dark 
solarized scheme.  These are the real thing, using the real published 
solarized colors.

You run the tool with the name of the scheme, e.g.

ColorTool.exe schemes\solarized_dark.itermcolors

You will get a window with a whole lot of colors.  Don't worry, it is only 
showing the various colors it uses.  You can clear the screen with the cls 
command if you like.

The new color scheme will stick until you set a new one or change some 
color(s) in the Properties dialog.


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/5168bb8f-37cd-4e55-ba04-93055441a648n%40googlegroups.com.


Re: Four New Themes For Leo

2021-07-12 Thread tbp1...@gmail.com
: ) You are welcome!

On Monday, July 12, 2021 at 12:59:27 AM UTC-4 tickli...@gmail.com wrote:

> The themes are so great! Thank you!
>
> On Saturday, July 10, 2021 at 9:06:25 PM UTC+7 tbp1...@gmail.com wrote:
>
>> The themes have already been merged into today's *devel* branch.
>>
>> On Saturday, July 10, 2021 at 9:14:33 AM UTC-4 tbp1...@gmail.com wrote:
>>
>>> Thanks, @gar!  I asked a while ago if changing the theme on the fly 
>>> could be done.  It can already almost be done.  When I open a theme file - 
>>> as an outline, I mean - Leo's colors mostly change to match the theme.  But 
>>> not in the log pane.  That seems to get a mix of old and new colors.  
>>> That's often unpleasant and sometime unreadable.  I wonder if the log 
>>> pane's styling doesn't set all the colors but leaves some of them at 
>>> previous values.
>>>
>>> Let me know if you would like the theme files sooner than the PR gets 
>>> approved, and I'll post them here.  It might be some time for the PR, since 
>>> @ekr is busy getting the beta of v6.4 ready for release.
>>>
>>> On Saturday, July 10, 2021 at 2:41:48 AM UTC-4 gar wrote:
>>>
>>>> tbp1, 
>>>> your themes are great. For my own need I changed the ekr's ones - but 
>>>> in a some ugly manner like change the colors for more bright for fonts and 
>>>> so one. Original ones seemed too poor for me. My changes made them 
>>>> slightly 
>>>> ugly.
>>>> Yours are quite balanced and look pretty.
>>>>
>>>> By the way, can Leo change the theme on the fly? AFAIR it never could, 
>>>> so changing a theme always was a challenge. 
>>>>
>>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/81915280-6d41-4c71-923b-0513c757b449n%40googlegroups.com.


Re: Four New Themes For Leo

2021-07-11 Thread Alexey Tikhonov
The themes are so great! Thank you!

On Saturday, July 10, 2021 at 9:06:25 PM UTC+7 tbp1...@gmail.com wrote:

> The themes have already been merged into today's *devel* branch.
>
> On Saturday, July 10, 2021 at 9:14:33 AM UTC-4 tbp1...@gmail.com wrote:
>
>> Thanks, @gar!  I asked a while ago if changing the theme on the fly could 
>> be done.  It can already almost be done.  When I open a theme file - as an 
>> outline, I mean - Leo's colors mostly change to match the theme.  But not 
>> in the log pane.  That seems to get a mix of old and new colors.  That's 
>> often unpleasant and sometime unreadable.  I wonder if the log pane's 
>> styling doesn't set all the colors but leaves some of them at previous 
>> values.
>>
>> Let me know if you would like the theme files sooner than the PR gets 
>> approved, and I'll post them here.  It might be some time for the PR, since 
>> @ekr is busy getting the beta of v6.4 ready for release.
>>
>> On Saturday, July 10, 2021 at 2:41:48 AM UTC-4 gar wrote:
>>
>>> tbp1, 
>>> your themes are great. For my own need I changed the ekr's ones - but in 
>>> a some ugly manner like change the colors for more bright for fonts and so 
>>> one. Original ones seemed too poor for me. My changes made them slightly 
>>> ugly.
>>> Yours are quite balanced and look pretty.
>>>
>>> By the way, can Leo change the theme on the fly? AFAIR it never could, 
>>> so changing a theme always was a challenge. 
>>>
>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/3ac70897-4299-4ef3-b045-42afcf72846cn%40googlegroups.com.


Re: Four New Themes For Leo

2021-07-10 Thread tbp1...@gmail.com
The themes have already been merged into today's *devel* branch.

On Saturday, July 10, 2021 at 9:14:33 AM UTC-4 tbp1...@gmail.com wrote:

> Thanks, @gar!  I asked a while ago if changing the theme on the fly could 
> be done.  It can already almost be done.  When I open a theme file - as an 
> outline, I mean - Leo's colors mostly change to match the theme.  But not 
> in the log pane.  That seems to get a mix of old and new colors.  That's 
> often unpleasant and sometime unreadable.  I wonder if the log pane's 
> styling doesn't set all the colors but leaves some of them at previous 
> values.
>
> Let me know if you would like the theme files sooner than the PR gets 
> approved, and I'll post them here.  It might be some time for the PR, since 
> @ekr is busy getting the beta of v6.4 ready for release.
>
> On Saturday, July 10, 2021 at 2:41:48 AM UTC-4 gar wrote:
>
>> tbp1, 
>> your themes are great. For my own need I changed the ekr's ones - but in 
>> a some ugly manner like change the colors for more bright for fonts and so 
>> one. Original ones seemed too poor for me. My changes made them slightly 
>> ugly.
>> Yours are quite balanced and look pretty.
>>
>> By the way, can Leo change the theme on the fly? AFAIR it never could, so 
>> changing a theme always was a challenge. 
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ed8ef7c6-6b04-457d-b56b-8a535b22f539n%40googlegroups.com.


Re: Four New Themes For Leo

2021-07-10 Thread tbp1...@gmail.com
Thanks, @gar!  I asked a while ago if changing the theme on the fly could 
be done.  It can already almost be done.  When I open a theme file - as an 
outline, I mean - Leo's colors mostly change to match the theme.  But not 
in the log pane.  That seems to get a mix of old and new colors.  That's 
often unpleasant and sometime unreadable.  I wonder if the log pane's 
styling doesn't set all the colors but leaves some of them at previous 
values.

Let me know if you would like the theme files sooner than the PR gets 
approved, and I'll post them here.  It might be some time for the PR, since 
@ekr is busy getting the beta of v6.4 ready for release.

On Saturday, July 10, 2021 at 2:41:48 AM UTC-4 gar wrote:

> tbp1, 
> your themes are great. For my own need I changed the ekr's ones - but in a 
> some ugly manner like change the colors for more bright for fonts and so 
> one. Original ones seemed too poor for me. My changes made them slightly 
> ugly.
> Yours are quite balanced and look pretty.
>
> By the way, can Leo change the theme on the fly? AFAIR it never could, so 
> changing a theme always was a challenge. 
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8db3f887-ec71-4d66-8758-bd81ff0c33a7n%40googlegroups.com.


Re: Four New Themes For Leo

2021-07-09 Thread gar
tbp1,
your themes are great. For my own need I changed the ekr's ones - but in a
some ugly manner like change the colors for more bright for fonts and so
one. Original ones seemed too poor for me. My changes made them slightly
ugly.
Yours are quite balanced and look pretty.

By the way, can Leo change the theme on the fly? AFAIR it never could, so
changing a theme always was a challenge.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAC%2B8SVwDUf_x2bDqCg9HFEOZ3tnfVCHer9m-F-prCW0teiNy6Q%40mail.gmail.com.


Re: leo + mac: Old light themes and shortcut for edit headline?

2021-05-15 Thread Satheesh Vattekkat
I realized that in OSX, this solution doesn't paint the tree open/closed 
icons making it a bit difficult to figure out whether a node has children 
or not.

I tried adding in myLeoSettings: @string tree-image-open = 
nodes-light/triangles/open.png; looking at the code, it does read this 
file, but icons are not drawn. Could be an OSX specific things.

Anyway, found a solution that goes with my preferred light gray background 
schemes. All nice light colors; arrow icons back etc.

Header edit shortcut is still a problem - since my workflow involves making 
outline first, edits of the text is not that much and living with it now.

@string theme-name = NullTheme
@string font-family = Fira Code,Droid Sans Mono
@string font-size-body = 14pt
@data qt-gui-user-style-sheet
  QWidget {
  background:  #e5e9f0;
  font-family: @font-family;
  font-size: @font-size-body;
  }
  QTextEdit {
  background: #e5e9f0;
  font-family: @font-family;
  }


On Thursday, May 13, 2021 at 10:22:11 AM UTC+5:30 Satheesh Vattekkat wrote:

> Awesome! This worked exactly like what I wanted. I tried using NoneTheme 
> and spent lot of time tweaking the settings - duh moment, didn't think of 
> giving a wrong theme name at all :)
>
>
> On Wednesday, May 12, 2021 at 11:07:02 PM UTC+5:30 tbp1...@gmail.com 
> wrote:
>
>> About themes, what I do is to specify a non-existent theme, then add a 
>> few settings to tweak the appearance, which is much like the old one.
>>
>> Here is what I put in MyLeoSettings.leo:
>>
>> @settings
>> @string theme-name = xxtbp_default_theme
>> No-theme Appearance Settings
>> @string font-size = 10pt 
>> @string font-family = Consolas, Droid Sans Mono, DejaVu Sans 
>> Mono, sans-serif
>> Gutter Settings
>> @bool use_gutter = True
>> @int gutter-y-adjust = 5
>>
>> You will probably want to change the font to something that is on the Mac 
>> that you like.  I only have all those fonts to be able to get something 
>> reasonable on a variety of Windows and Linux machines I sometimes use (I 
>> copy the file to each of them when I set them up with Leo).  You might need 
>> to tweak the gutter-y-adjust to suit your font.
>>
>> The theme name points to a theme file that doesn't exist.  Leo doesn't 
>> use the default theme if it can't find the one you specify here, and 
>> instead gives you the old appearance. That seems a bit odd, but I'm very 
>> glad of it.  I hope that Edward doesn't decide to change it.
>> On Wednesday, May 12, 2021 at 8:07:11 AM UTC-4 Satheesh Vattekkat wrote:
>>
>>> Got a new macbook (work policy:)) and I had to get this all setup again.
>>>
>>> Installed Leo from git and two things I am finding it difficult on how 
>>> to handle (I was on an older version of Leo on Linux so far).
>>>
>>> 1. How do I get the old light color scheme. Couldn't see any @theme 
>>> files for that. Dark DefaultTheme is too dark for me and PaperLight and 
>>> EKRLight are, well not something I am used to yet.
>>> 2. Cmd-H is reserved by Apple. Saw EKR's post about this. Is there any 
>>> way we can set a shortcut for this? I tried @shortcut in myLocalSettings 
>>> for edit-headline and it always shows up as an error.
>>>
>>> edit-headline = Alt-h  for example didn't work.
>>>
>>> Any help will be great... I did search around in groups and in 
>>> documentation - made a new theme, but it is not really as good as the old 
>>> one.
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/7c06582a-eeac-4795-9f4d-a8f630fdabf7n%40googlegroups.com.


Re: leo + mac: Old light themes and shortcut for edit headline?

2021-05-12 Thread Satheesh Vattekkat
Awesome! This worked exactly like what I wanted. I tried using NoneTheme 
and spent lot of time tweaking the settings - duh moment, didn't think of 
giving a wrong theme name at all :)


On Wednesday, May 12, 2021 at 11:07:02 PM UTC+5:30 tbp1...@gmail.com wrote:

> About themes, what I do is to specify a non-existent theme, then add a few 
> settings to tweak the appearance, which is much like the old one.
>
> Here is what I put in MyLeoSettings.leo:
>
> @settings
> @string theme-name = xxtbp_default_theme
> No-theme Appearance Settings
> @string font-size = 10pt 
> @string font-family = Consolas, Droid Sans Mono, DejaVu Sans Mono, 
> sans-serif
> Gutter Settings
> @bool use_gutter = True
> @int gutter-y-adjust = 5
>
> You will probably want to change the font to something that is on the Mac 
> that you like.  I only have all those fonts to be able to get something 
> reasonable on a variety of Windows and Linux machines I sometimes use (I 
> copy the file to each of them when I set them up with Leo).  You might need 
> to tweak the gutter-y-adjust to suit your font.
>
> The theme name points to a theme file that doesn't exist.  Leo doesn't use 
> the default theme if it can't find the one you specify here, and instead 
> gives you the old appearance. That seems a bit odd, but I'm very glad of 
> it.  I hope that Edward doesn't decide to change it.
> On Wednesday, May 12, 2021 at 8:07:11 AM UTC-4 Satheesh Vattekkat wrote:
>
>> Got a new macbook (work policy:)) and I had to get this all setup again.
>>
>> Installed Leo from git and two things I am finding it difficult on how to 
>> handle (I was on an older version of Leo on Linux so far).
>>
>> 1. How do I get the old light color scheme. Couldn't see any @theme files 
>> for that. Dark DefaultTheme is too dark for me and PaperLight and EKRLight 
>> are, well not something I am used to yet.
>> 2. Cmd-H is reserved by Apple. Saw EKR's post about this. Is there any 
>> way we can set a shortcut for this? I tried @shortcut in myLocalSettings 
>> for edit-headline and it always shows up as an error.
>>
>> edit-headline = Alt-h  for example didn't work.
>>
>> Any help will be great... I did search around in groups and in 
>> documentation - made a new theme, but it is not really as good as the old 
>> one.
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/af92af12-d958-4c99-bdd5-7d38d1cd52e0n%40googlegroups.com.


Re: leo + mac: Old light themes and shortcut for edit headline?

2021-05-12 Thread tbp1...@gmail.com
About themes, what I do is to specify a non-existent theme, then add a few 
settings to tweak the appearance, which is much like the old one.

Here is what I put in MyLeoSettings.leo:

@settings
@string theme-name = xxtbp_default_theme
No-theme Appearance Settings
@string font-size = 10pt 
@string font-family = Consolas, Droid Sans Mono, DejaVu Sans Mono, 
sans-serif
Gutter Settings
@bool use_gutter = True
@int gutter-y-adjust = 5

You will probably want to change the font to something that is on the Mac 
that you like.  I only have all those fonts to be able to get something 
reasonable on a variety of Windows and Linux machines I sometimes use (I 
copy the file to each of them when I set them up with Leo).  You might need 
to tweak the gutter-y-adjust to suit your font.

The theme name points to a theme file that doesn't exist.  Leo doesn't use 
the default theme if it can't find the one you specify here, and instead 
gives you the old appearance. That seems a bit odd, but I'm very glad of 
it.  I hope that Edward doesn't decide to change it.
On Wednesday, May 12, 2021 at 8:07:11 AM UTC-4 Satheesh Vattekkat wrote:

> Got a new macbook (work policy:)) and I had to get this all setup again.
>
> Installed Leo from git and two things I am finding it difficult on how to 
> handle (I was on an older version of Leo on Linux so far).
>
> 1. How do I get the old light color scheme. Couldn't see any @theme files 
> for that. Dark DefaultTheme is too dark for me and PaperLight and EKRLight 
> are, well not something I am used to yet.
> 2. Cmd-H is reserved by Apple. Saw EKR's post about this. Is there any way 
> we can set a shortcut for this? I tried @shortcut in myLocalSettings for 
> edit-headline and it always shows up as an error.
>
> edit-headline = Alt-h  for example didn't work.
>
> Any help will be great... I did search around in groups and in 
> documentation - made a new theme, but it is not really as good as the old 
> one.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/df340108-66b2-4b48-a900-f0b0bef71f04n%40googlegroups.com.


leo + mac: Old light themes and shortcut for edit headline?

2021-05-12 Thread Satheesh Vattekkat
Got a new macbook (work policy:)) and I had to get this all setup again.

Installed Leo from git and two things I am finding it difficult on how to 
handle (I was on an older version of Leo on Linux so far).

1. How do I get the old light color scheme. Couldn't see any @theme files 
for that. Dark DefaultTheme is too dark for me and PaperLight and EKRLight 
are, well not something I am used to yet.
2. Cmd-H is reserved by Apple. Saw EKR's post about this. Is there any way 
we can set a shortcut for this? I tried @shortcut in myLocalSettings for 
edit-headline and it always shows up as an error.

edit-headline = Alt-h  for example didn't work.

Any help will be great... I did search around in groups and in 
documentation - made a new theme, but it is not really as good as the old 
one.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/98f65fbe-9804-49ec-854a-357d3410b895n%40googlegroups.com.


Re: Progress re themes. Theme devs, pls read

2020-12-26 Thread gar
>
> How a new user would know about any of this is hard for me to see.  At a
> minimum, a menu item that offers to change the font size would be easy to
> find and use.  Changing the font is probably what many new users will want
> to do soon after opening Leo.  It's easy to think of ways this could be
> implemented, some more of a hack than others.
>
> Absolutely true!
Also I noticed that when theme outline is loaded - Leo applies the theme.
So why not implement a dropdown menu with all found themes so users can
change look and feel on the fly?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAC%2B8SVwwF%2BTY7ozewB7gMvo5nN1bzv_AZQF4dvzz0-kFtLHDBA%40mail.gmail.com.


Re: Progress re themes. Theme devs, pls read

2020-12-26 Thread tbp1...@gmail.com
On Saturday, December 26, 2020 at 9:10:39 AM UTC-5 gar wrote:

> It's a matter of adding or changing a setting in *myLeoSettings.leo* vs 
>> changing a setting in a theme outline.  Not much different.  More of a 
>> difficulty is knowing what particular settings to change.
>>
> Great difference actually. When you setup a fresh computer - you need to 
> copy not a single file but a bulk of them. And somehow remember that you 
> cannot easily change the settings - you must change the theme itself. And 
> do it for every theme you're going to use. Good deal, yeah?
>

Not that I like the new design all that much (I mean not being able to 
override at least a few key settings using *myLeoSettings*), but I don't 
think the fresh computer aspect itself is very unpleasant.  That's because 
I already copy my *workbook.leo* from an existing Leo installation when I 
set up a new virtual machine.  When I'm looking at *~/.leo*, I notice the 
*themes 
*directory and that reminds me to copy it.  And I generally copy 
*myLeoSettings.leo*, too, or at least some of its settings.  So I get a 
second reminder about my theme file.

How a new user would know about any of this is hard for me to see.  At a 
minimum, a menu item that offers to change the font size would be easy to 
find and use.  Changing the font is probably what many new users will want 
to do soon after opening Leo.  It's easy to think of ways this could be 
implemented, some more of a hack than others.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/aa440011-4ae0-4719-b4b6-154ed0efdcb9n%40googlegroups.com.


Re: Progress re themes. Theme devs, pls read

2020-12-26 Thread gar
>
> It's a matter of adding or changing a setting in *myLeoSettings.leo* vs
> changing a setting in a theme outline.  Not much different.  More of a
> difficulty is knowing what particular settings to change.
>
Great difference actually. When you setup a fresh computer - you need to
copy not a single file but a bulk of them. And somehow remember that you
cannot easily change the settings - you must change the theme itself. And
do it for every theme you're going to use. Good deal, yeah?

In my case, I copied one of the dark themes and used that renamed copy to
> try to reduce the font size and one or two other items, like font family
> and gutter settings.  I put it into my *.leo/themes* directory, where Leo
> will look for it.  Usually on a Linux system *.leo/themes* is at
> *~/.leo/themes* and on a Windows system it's at
> *%USERPROFILE%/.leo/themes*. Either is not hard to navigate to.  You do
> need to create the *themes *directory yourself.
>
compare with ":colorsheme ".

Alternatively if you don't use any theme (set it to None or a non-existent
> theme), you get the old Leo color scheme, and you can still modify that in 
> *myLeoSettings
> *- although changing all the settings one by one over to a dark theme,
> say, would be an unpleasantly long and difficult task.
>
Well.. Default settings operate with  one set of options, whilst themes -
with another. This concerns fonts at least. And theme's set cannot be
overridden on myLeoSettings.
Oh, that's a nightmare.  Actually, leo's learning curve is much longer then
vim's one. Nothing works out of the box intuitively.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAC%2B8SVxqShsLiRH2%2Beq%2BLj4XnKrrXmkWC1oy%2BBKQ%3DiBrg-6%3D7A%40mail.gmail.com.


Re: Progress re themes. Theme devs, pls read

2020-12-26 Thread tbp1...@gmail.com
It's a matter of adding or changing a setting in *myLeoSettings.leo* vs 
changing a setting in a theme outline.  Not much different.  More of a 
difficulty is knowing what particular settings to change.

In my case, I copied one of the dark themes and used that renamed copy to 
try to reduce the font size and one or two other items, like font family 
and gutter settings.  I put it into my *.leo/themes* directory, where Leo 
will look for it.  Usually on a Linux system *.leo/themes* is at 
*~/.leo/themes* and on a Windows system it's at *%USERPROFILE%/.leo/themes*. 
Either is not hard to navigate to.  You do need to create the *themes 
*directory 
yourself.

Alternatively if you don't use any theme (set it to None or a non-existent 
theme), you get the old Leo color scheme, and you can still modify that in 
*myLeoSettings 
*- although changing all the settings one by one over to a dark theme, say, 
would be an unpleasantly long and difficult task.



On Saturday, December 26, 2020 at 4:09:12 AM UTC-5 Edward K. Ream wrote:

> On Sat, Dec 26, 2020 at 2:18 AM gar  wrote:
>
>> But still, how can I reduce leo's font size with a theme applied w/o 
>> modifying the theme outline itself?
>>
>
> You can't, because the setting is in the theme file.
>
> Yes, I know this isn't optimal. The question is, do we want to force 
> everyone to change their present workflow. It's a close call.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/4837e918-03da-4b52-8202-99312ef6cacbn%40googlegroups.com.


Re: Progress re themes. Theme devs, pls read

2020-12-26 Thread Edward K. Ream
On Sat, Dec 26, 2020 at 2:18 AM gar  wrote:

> But still, how can I reduce leo's font size with a theme applied w/o
> modifying the theme outline itself?
>

You can't, because the setting is in the theme file.

Yes, I know this isn't optimal. The question is, do we want to force
everyone to change their present workflow. It's a close call.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1eoKMFes5rXpxWrx191Y_bc7%2BXuntJRxR1k3TV%3D5yepg%40mail.gmail.com.


Re: Progress re themes. Theme devs, pls read

2020-12-26 Thread gar
But still, how can I reduce leo's font size with a theme applied w/o
modifying the theme outline itself?
Playing with `@string font-size`is still gives absolutely nothing.
In my opinion the inability to change font size easily is the great miss of
leo's styling. Cause default fonts are INCREDIBLY huge.

вт, 22 дек. 2020 г. в 22:35, Edward K. Ream :

>
>
> On Tue, Dec 22, 2020 at 11:21 AM tbp1...@gmail.com 
> wrote:
>
>> I'm currently using
>>
>> @string font-family = Consolas, Droid Sans Mono, DejaVu Sans Mono
>>
>> I think that that Consolas comes with Windows and I like it better than
>> some of the alternatives.  Apparently it can be installed on Linux in some
>> manner.  I should probably move the DajaVu font ahead of the Droid, but at
>> any rate this setting seems to work all right on both Windows and Linux.
>>
>
> Thanks for these comments. Consolas does look fairly good.
>
> Devs, please feel free to change the font setting as you please in your
> own themes.
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS0woyZXozs7YMwwpLdri9-Uf4p6%2Bg_TExMevotVmygnWw%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS0woyZXozs7YMwwpLdri9-Uf4p6%2Bg_TExMevotVmygnWw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAC%2B8SVwNjwz3vqTmE7%2BYQcROhqO9UnoxW%3D_q7vrji%3DDboQL-Lw%40mail.gmail.com.


Re: Themes: What is the setting to change the gutter font size?

2020-12-24 Thread Edward K. Ream
On Thu, Dec 24, 2020 at 8:33 AM tbp1...@gmail.com 
wrote:


>> I suspect that your theme's stylesheet doesn't support gutter-font-size.
>> My personal style sheet contained:
>>
>> QFrame#gutter {
>>   background: gray;
>> }
>>
>
> I did find that one, but didn't know what should be in there. I'm not
> clear if it's a standard css stylesheet or whether Leo processes it in some
> way.   Can it use one of the parameterized values, like @medium-font-size?
>

The fragment is part of a standard stylesheet, and Leo does pre-process
that sheet, substituting parameterized values.

When in doubt, use the show-settings and show-stylesheet commands.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS2kgWe79dCRKwNFttZAG2P9VStC0o5L_FdQwxuCesN95A%40mail.gmail.com.


Re: Themes: What is the setting to change the gutter font size?

2020-12-24 Thread tbp1...@gmail.com


On Thursday, December 24, 2020 at 6:43:31 AM UTC-5 Edward K. Ream wrote:

> On Wed, Dec 23, 2020 at 11:24 PM tbp1...@gmail.com  
> wrote:
>
> I haven't been able to find a setting for specifying the gutter font 
>> size.  
>>
>
> leoSettings.leo contains a "Gutter Fonts" node, with four settings, but 
> you probably already know that. 
>
> One of those settings is @string gutter-font-size = @small-font-size. Did 
> you change this setting?
>

No, I thought all theme settings have been moved into the theme outline, 
and I didn't think to look there. 
 

> Searching through Leo's core sources, I see that Leo only uses the @bool 
> use-gutter setting.
>
> I suspect that your theme's stylesheet doesn't support gutter-font-size. 
> My personal style sheet contained:
>
> QFrame#gutter {
>   background: gray;
> } 
>

I did find that one, but didn't know what should be in there. I'm not clear 
if it's a standard css stylesheet or whether Leo processes it in some way. 
  Can it use one of the parameterized values, like @medium-font-size?
 

> Changing this to the following worked for me:
>
> QFrame#gutter {
>   font-size: 20pt;
>   background: gray;
> } 
>
> HTH.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/9d6a8081-a5d0-40d8-aa88-db3bdc64e3c1n%40googlegroups.com.


Re: Themes: What is the setting to change the gutter font size?

2020-12-24 Thread Edward K. Ream
On Wed, Dec 23, 2020 at 11:24 PM tbp1...@gmail.com 
wrote:

I haven't been able to find a setting for specifying the gutter font size.
>

leoSettings.leo contains a "Gutter Fonts" node, with four settings, but you
probably already know that.

One of those settings is @string gutter-font-size = @small-font-size. Did
you change this setting?

Searching through Leo's core sources, I see that Leo only uses the @bool
use-gutter setting.

I suspect that your theme's stylesheet doesn't support gutter-font-size. My
personal style sheet contained:

QFrame#gutter {
  background: gray;
}

Changing this to the following worked for me:

QFrame#gutter {
  font-size: 20pt;
  background: gray;
}

HTH.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3sH4whwHX%3DEiEkWE08p3ByMk3GDmdpyb7m6xKZkK_qjQ%40mail.gmail.com.


Themes: What is the setting to change the gutter font size?

2020-12-23 Thread tbp1...@gmail.com
I haven't been able to find a setting for specifying the gutter font size.  
When I change the default theme to use 10pt text, the gutter numbers look 
like they stay at 12 pt (although they line up properly).  I have searched 
both the default theme  and LeoPyRef, and haven't found it so far.

Pre-themes, I think it used the body font size.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/78f6b384-e678-4c12-94e8-e028030ac346n%40googlegroups.com.


Re: Progress re themes. Theme devs, pls read

2020-12-22 Thread Edward K. Ream
On Tue, Dec 22, 2020 at 11:21 AM tbp1...@gmail.com 
wrote:

> I'm currently using
>
> @string font-family = Consolas, Droid Sans Mono, DejaVu Sans Mono
>
> I think that that Consolas comes with Windows and I like it better than
> some of the alternatives.  Apparently it can be installed on Linux in some
> manner.  I should probably move the DajaVu font ahead of the Droid, but at
> any rate this setting seems to work all right on both Windows and Linux.
>

Thanks for these comments. Consolas does look fairly good.

Devs, please feel free to change the font setting as you please in your own
themes.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0woyZXozs7YMwwpLdri9-Uf4p6%2Bg_TExMevotVmygnWw%40mail.gmail.com.


Re: Progress re themes. Theme devs, pls read

2020-12-22 Thread tbp1...@gmail.com
I'm currently using

@string font-family = Consolas, Droid Sans Mono, DejaVu Sans Mono

I think that that Consolas comes with Windows and I like it better than 
some of the alternatives.  Apparently it can be installed on Linux in some 
manner.  I should probably move the DajaVu font ahead of the Droid, but at 
any rate this setting seems to work all right on both Windows and Linux.
On Tuesday, December 22, 2020 at 10:28:00 AM UTC-5 Edward K. Ream wrote:

> On Tuesday, December 22, 2020 at 5:46:37 AM UTC-6 Edward K. Ream wrote:
>
> 2. All theme files now specify font sizes in points (pt) rather than 
>> pixels (px). Using pixels to specify font sizes is brain dead. I am 
>> responsible for this, and I fear theme devs followed my lead.
>>
>
> How did I ever live without the git-diff-pr command? It reminds me that I 
> did make another significant change to text settings:
>
> Old: @string font-family = Inconsolata, Droid Sans Mono, DejaVu Sans Mono
> New: @string font-family = DejaVu Sans Mono
>
> I did this because Inconsolata is unacceptable on my Windows machine.
>
> The fundamental problem is that there is no way to select fonts based on 
> the platform. As I write this, I see that the workaround will be to change 
> the load order:
>
> @string font-family = DejaVu Sans Mono, Inconsolata,  Droid Sans Mono 
>
> I'll do this today. 
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/d436d41d-aeb4-4b6d-92ff-41851a3ba4a2n%40googlegroups.com.


Re: Progress re themes. Theme devs, pls read

2020-12-22 Thread Edward K. Ream
On Tuesday, December 22, 2020 at 5:46:37 AM UTC-6 Edward K. Ream wrote:

2. I have used the preferred names for settings in theme files. Settings 
> names have the form x-y-z rather than x_y_z.
>

Only in a few places. Style sheets refer to settings with underscores, and 
I'm not sure whether Leo's stylesheet machinery could handle a change. 
Safer not to find out. I have chosen to leave underscores alone.

I plan no further work on @1792. I'll wait at least a week to merge 
ekr-theme into devel. Now is the time for testing.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/839f8470-0368-4447-99be-264bd98cd2fcn%40googlegroups.com.


Re: Progress re themes. Theme devs, pls read

2020-12-22 Thread Edward K. Ream
On Tuesday, December 22, 2020 at 5:46:37 AM UTC-6 Edward K. Ream wrote:

2. All theme files now specify font sizes in points (pt) rather than pixels 
> (px). Using pixels to specify font sizes is brain dead. I am responsible 
> for this, and I fear theme devs followed my lead.
>

How did I ever live without the git-diff-pr command? It reminds me that I 
did make another significant change to text settings:

Old: @string font-family = Inconsolata, Droid Sans Mono, DejaVu Sans Mono
New: @string font-family = DejaVu Sans Mono

I did this because Inconsolata is unacceptable on my Windows machine.

The fundamental problem is that there is no way to select fonts based on 
the platform. As I write this, I see that the workaround will be to change 
the load order:

@string font-family = DejaVu Sans Mono, Inconsolata,  Droid Sans Mono 

I'll do this today. 

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8f7b4e8e-0644-4457-a813-0c9778d1bd7fn%40googlegroups.com.


Re: Progress re themes. Theme devs, pls read

2020-12-22 Thread Edward K. Ream
On Tue, Dec 22, 2020 at 5:46 AM Edward K. Ream  wrote:

*Functional changes to theme files*
>
> When I started this project I said that I would make no "real" changes to
> theme files. This is mostly still true, with the following important
> exceptions:
>

I should emphasize that I made *zero* changes to style sheets.

I did change the various EKR dark themes so that the trailing whitespace
indicator is visible This was a buglet in the themes. Otoh, I disabled it
after about 30 seconds of usage :-) I find it way too annoying.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS2FOnaq1N3Nz4p5i%2BESX2sxXg8ywfWs2AZna0ASD4kSgQ%40mail.gmail.com.


Progress re themes. Theme devs, pls read

2020-12-22 Thread Edward K. Ream
Yesterday saw breakthroughs and simplifications regarding Leo's theme 
files, .leo files in the leo/themes folders. This post summarizes 
yesterday's work, all contained in the ekr-theme branch. See #1792 
<https://github.com/leo-editor/leo-editor/issues/1792>.

*Aha re testing themes*

Leo loads the settings in theme files second-to-last, that is, just before 
loading the actual .leo file being loaded. This means leoSettings.leo and 
myLeoSettings.leo affect theme files.

Theme files can (and must) deal with the environment leoSettings.leo 
provides, but theme files (and their devs) can't know what will be in 
myLeoSettings.leo.

In the past, I have disabled myLeoSettings.leo completely while testing 
theme files, but this is clumsy: I lose useful settings that won't affect 
theme files, settings such as abbreviations, @command scripts, split 
direction, and find-panel settings.

*Aha*: test theme files with a minimal @settings node in myLeoSettings.leo.

So simple: Replace my usual @settings tree with a minimal @settings tree. 
As an aid to doing this, Leo's code (in ekr-theme) ignores comments after 
@settings. So during testing my two @settings trees look like this:

- @@@settings (full)
- @settings (minimal)

*Simplifying theme files*

Previously, theme files contained @theme trees. Iirc, only settings 
contained within an @theme tree actually took effect.

Looking at theme files with fresh eyes, I suddenly realized that the @theme 
is a (confusing!) holdover from the bad old early days, when users were 
told to cut and paste @theme nodes into their myLeoSettings.leo. Now, these 
nodes are not needed.

Leo's settings node (in ekr-theme) no longer treats @theme nodes as a 
special case. This means:

- All settings in theme nodes have effect.
- Settings nodes should contain only settings that affect Leo's appearance.
- There is no need for @theme nodes.
- There is no need for the confusing distinction between theme settings and 
other settings.

These simplifications cascade into further simplifications. Confusing 
organizer nodes disappear, and a simpler organization presents itself, as 
you can see by looking at the new theme files.

*Functional changes to theme files*

When I started this project I said that I would make no "real" changes to 
theme files. This is mostly still true, with the following important 
exceptions:

1. Theme files no longer contain the @string theme-name setting. This 
setting serves no purpose at all within theme files. In fact, this setting 
can only have effect within myLeoSettings.leo. This setting causes Leo to 
load the theme file, and does *nothing* else.

2. All theme files now specify font sizes in points (pt) rather than pixels 
(px). Using pixels to specify font sizes is brain dead. I am responsible 
for this, and I fear theme devs followed my lead.

3. At present, all theme files use 12 point fonts everywhere, except 
possibly for the so-called small fonts, which use 10 points. This new 
"policy" may not be what some theme devs want. If not, let me know. I'll be 
happy to change any theme so it uses different sizes.

*Additional changes*

The following changes do not have any functional effect on themes, but they 
are worth mentioning:

1. Theme files *must not* set @string target-language. That would 
invalidate the corresponding setting in myLeoSettings.leo.  Instead, theme 
files now use @language rest (or @language md) to specify coloring.

2. I have used the preferred names for settings in theme files. Settings 
names have the form x-y-z rather than x_y_z.

3. The @string color-theme setting is no longer considered a "theme related 
setting". Indeed, that distinction no longer exists. Comments in the 
setting node make clear that this setting specifies the path to a folder 
containing icons. The name "color-theme" is poorly chosen, but I don't dare 
change it now. Understand?

*Testing*

The ekr-theme branch is ready for testing. I will work on it further today. 

Theme devs, please ensure that your theme looks as you want it to. If not, 
please let me know.

*Summary*

Using a minimal @settings tree in myLeoSettings.leo simplifies the 
(complex!) task of developing theme files. Leo now ignores comments in 
@settings nodes, which helps keep track of multiple @settings nodes.

Leo no longer special cases @theme trees within @settings files. As a 
result, theme files no longer use @theme trees.

*All settings in theme files now have effect.* Theme files should contain 
*only* appearance-related settings. In particular, theme files no longer 
contain @string target-language settings.

The result of all these changes is a collapse in the complexity of theme 
files. Apart from font sizes, all themes should behave exactly as before. 
If not, please let me know immediately.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-ed

Re: Themes documentation

2020-11-14 Thread Edward K. Ream
On Mon, Nov 9, 2020 at 3:27 PM Thomas Passin  wrote:


I think underscore vs dash does not matter.  When Leo imports the settings,
> both of them are removed.
>

That's correct.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3kJ8EjKNvc4g3jNg6XX3biT7i60k7wA3UrC5g19173mQ%40mail.gmail.com.


Re: Themes documentation

2020-11-14 Thread Edward K. Ream
On Mon, Nov 9, 2020 at 2:22 PM Rob  wrote:

> Having trouble loading different themes, so checking the online
> documentation here <http://leoeditor.com/customizing.html#theme-files> as
> well as looking at the main LeoSettings.leo and other theme files, I'm
> confused.
>
> Quoting from the web site:
>
> To enable a theme, put the following setting in myLeoSettings.leo:
> @string theme-name 
>
> First question is shouldn't that read: @string theme-name =
> ? (Missing `=`)
>

Fixed in devel.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3yJbZhhVby%2Bd%3DWmThE75Zxw5%3D9yCPhz1KN9FdvhHZzjg%40mail.gmail.com.


Re: Themes documentation

2020-11-09 Thread Thomas Passin
On Monday, November 9, 2020 at 3:22:04 PM UTC-5, Rob wrote:
>
> Having trouble loading different themes, so checking the online 
> documentation here <http://leoeditor.com/customizing.html#theme-files> as 
> well as looking at the main LeoSettings.leo and other theme files, I'm 
> confused.
>
> Quoting from the web site:
>
> To enable a theme, put the following setting in myLeoSettings.leo:
> @string theme-name 
>
> First question is shouldn't that read: @string theme-name = 
> ? (Missing `=`)
>

Right.
 

> Then later:
>
> Theme files should contain three settings that describe the theme:
> @bool color_theme_is_dark # True for dark themes 
> @string color_theme = name # Used to find icons 
> @string theme_name # Used to find other graphics elements.
>
> Second question, is which syntax is correct theme_name or theme-name 
> (underscore or dash)? I see both used. Does it matter?
>

I think underscore vs dash does not matter.  When Leo imports the settings, 
both of them are removed (as I'm pretty sure I saw somewhere in the code).

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/1963842d-32de-44aa-a884-a835887dffb1o%40googlegroups.com.


Re: Themes documentation

2020-11-09 Thread Rob
Ignore the third question as I had the setting in the wrong place.


On Monday, November 9, 2020 at 3:22:04 PM UTC-5 Rob wrote:

> Having trouble loading different themes, so checking the online 
> documentation here <http://leoeditor.com/customizing.html#theme-files> as 
> well as looking at the main LeoSettings.leo and other theme files, I'm 
> confused.
>
> Quoting from the web site:
>
> To enable a theme, put the following setting in myLeoSettings.leo:
> @string theme-name 
>
> First question is shouldn't that read: @string theme-name = 
> ? (Missing `=`)
>
> Then later:
>
> Theme files should contain three settings that describe the theme:
> @bool color_theme_is_dark # True for dark themes 
> @string color_theme = name # Used to find icons 
> @string theme_name # Used to find other graphics elements.
>
> Second question, is which syntax is correct theme_name or theme-name 
> (underscore or dash)? I see both used. Does it matter?
>
> Third question is even trying both syntaxes, I can't get a different theme 
> to load. I continue to get the '*expand_css_constants Unresolved 
> @constants*' errors from before and don't know if those are theme related.
>
> Rob...
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/d781c11a-f1c5-4f13-b78f-e243cf1a2927n%40googlegroups.com.


Themes documentation

2020-11-09 Thread Rob
Having trouble loading different themes, so checking the online 
documentation here <http://leoeditor.com/customizing.html#theme-files> as 
well as looking at the main LeoSettings.leo and other theme files, I'm 
confused.

Quoting from the web site:

To enable a theme, put the following setting in myLeoSettings.leo:
@string theme-name 

First question is shouldn't that read: @string theme-name = 
? (Missing `=`)

Then later:

Theme files should contain three settings that describe the theme:
@bool color_theme_is_dark # True for dark themes 
@string color_theme = name # Used to find icons 
@string theme_name # Used to find other graphics elements.

Second question, is which syntax is correct theme_name or theme-name 
(underscore or dash)? I see both used. Does it matter?

Third question is even trying both syntaxes, I can't get a different theme 
to load. I continue to get the '*expand_css_constants Unresolved @constants*' 
errors from before and don't know if those are theme related.

Rob...

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/2b19b175-036e-4f11-8d6e-d974f5856be0n%40googlegroups.com.


Re: Leo Themes with VR3

2020-11-06 Thread Thomas Passin
That's not a message from VR3.  The stylesheets for VR3 are contained in 
the leo/plugins/viewrendered3 directory.  You can override that by the 
setting @string vr3-rst-stylesheet, or vr3-md-stylesheet for Markdown,  so 
you could check to see if that setting exists in your myLeoSettings.leo 
file.  I have not checked the VR source code to see what css stylesheet it 
normally uses.

As for disabling the VR plugin, if I understand correctly, Edward has 
arranged that it gets loaded even if not listed in @enabled-plugins so that 
it will be available to display help and plugin information.  If VR3 has 
been loaded, it will be used instead used.

However, I noticed just now that if I remove VR and VR3 from the enabled 
list, and VR still pops up to display plugin info, that my key binding to 
it doesn't work. (it also popped up as a freestanding window, not what one 
really wants in most cases).

On Friday, November 6, 2020 at 2:50:38 PM UTC-5, Viktor Ransmayr wrote:
>
> Hello Thomas,
>
> tbp1...@gmail.com schrieb am Mittwoch, 4. November 2020 um 23:26:18 UTC+1:
>
>> It has been pointed out that VR3 does not pick up dark Leo themes, like 
>> the current default EKRDark.  Viewrendered, on the other hand, does.  I've 
>> been looking at addressing this, and could use some help on a few things.
>>
>> First of all, I haven't been able to see how the Leo theme gets applied 
>> to VR.  So far as I can see, VR emits html that has no css styling at all; 
>> presumably the pane somehow uses the theme's style sheet.  But when I 
>> disable the normal stylesheet in VR3, the dark theme is not applied.  You 
>> can see that it is applied to the overall pane itself (for example the 
>> toolbar, which is a QT Widget), but as the browser first paints you can see 
>> the background change from the theme's dark to the usual light background.  
>> Yet the code for loading and displaying the browser in the pane is 
>> basically identical between the two plugins.
>>
>> Somewhere I'm overlooking a difference.  If anyone can help with this, 
>> I'd much appreciate it.
>>
>
>  *Disclaimer: I have not done any check at the source code level of both 
> plugins.*
>
> However, I'd like to make you aware of an error message from the log-pane, 
> when executing the 'rst3' command, which as far as I understand it, does 
> require 'some' rendering (?VR plugin?) capabilities:
>
> ###
>
> Leo Log Window
> Leo 6.2.1 final
> Python 3.8.6, PyQt version 5.15.0
> linux
> setting leoID from os.getenv('USER'): 'user'
> current dir: /home/user/PyVE/PyPI/Leo-stable
>
> load dir: 
> /home/user/PyVE/PyPI/Leo-stable/lib64/python3.8/site-packages/leo/core
>
> global config dir: 
> /home/user/PyVE/PyPI/Leo-stable/lib64/python3.8/site-packages/leo/config
> home dir: /home/user
>
> reading settings in 
> /home/user/PyVE/PyPI/Leo-stable/lib64/python3.8/site-packages/leo/config/leoSettings.leo
> reading settings in /home/user/.leo/myLeoSettings.leo
> reading settings in /home/user/Documents/SL2020.leo
> read outline in 0.29 seconds
>
> wrote recent file: /home/user/.leo/.leoRecentFiles.txt
>  saved: SL2020.leo
> wrote: /home/user/Documents/SL/2020/11/CW45/LE-2020-11-06.html.txt
> stylesheet not found <- !!!
>  /home/user/Documents/default.css <- !!!
> @path: /home/user/Documents
> open path: /home/user/Documents
> wrote: /home/user/Documents/SL/2020/11/CW45/LE-2020-11-06.html
> rst3: 1 files in 0.05 sec.
> ###
>
> I've tried to attempt to disable any renderer, i.e. the 'VR' as well as 
> the 'VR3' plugin in the 'myLeoSettings' file.
>
> The result was somewhat surprising (at least to me) in that the menu / 
> user action 'Help > Open help Topics > Help' continues to work.
>
> My current working theory is that as a user I can't disable **each & 
> every** plugins.
>
> That is, there's still a set of '?mandatory core?' plugins, which Leo 
> keeps active at all time.
>
> That's all that I can provide as a response from my side for now.
>
> With kind regards,
>
> Viktor
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/a2a3bafe-f9fa-4285-96dc-c4535d495461o%40googlegroups.com.


Re: Leo Themes with VR3

2020-11-06 Thread Viktor Ransmayr
Hello Thomas,

tbp1...@gmail.com schrieb am Mittwoch, 4. November 2020 um 23:26:18 UTC+1:

> It has been pointed out that VR3 does not pick up dark Leo themes, like 
> the current default EKRDark.  Viewrendered, on the other hand, does.  I've 
> been looking at addressing this, and could use some help on a few things.
>
> First of all, I haven't been able to see how the Leo theme gets applied to 
> VR.  So far as I can see, VR emits html that has no css styling at all; 
> presumably the pane somehow uses the theme's style sheet.  But when I 
> disable the normal stylesheet in VR3, the dark theme is not applied.  You 
> can see that it is applied to the overall pane itself (for example the 
> toolbar, which is a QT Widget), but as the browser first paints you can see 
> the background change from the theme's dark to the usual light background.  
> Yet the code for loading and displaying the browser in the pane is 
> basically identical between the two plugins.
>
> Somewhere I'm overlooking a difference.  If anyone can help with this, I'd 
> much appreciate it.
>

 *Disclaimer: I have not done any check at the source code level of both 
plugins.*

However, I'd like to make you aware of an error message from the log-pane, 
when executing the 'rst3' command, which as far as I understand it, does 
require 'some' rendering (?VR plugin?) capabilities:

###

Leo Log Window
Leo 6.2.1 final
Python 3.8.6, PyQt version 5.15.0
linux
setting leoID from os.getenv('USER'): 'user'
current dir: /home/user/PyVE/PyPI/Leo-stable
load dir: /home/user/PyVE/PyPI/Leo-stable/lib64/python3.8/site-packages/leo/core
global config dir: 
/home/user/PyVE/PyPI/Leo-stable/lib64/python3.8/site-packages/leo/config
home dir: /home/user
reading settings in 
/home/user/PyVE/PyPI/Leo-stable/lib64/python3.8/site-packages/leo/config/leoSettings.leo
reading settings in /home/user/.leo/myLeoSettings.leo
reading settings in /home/user/Documents/SL2020.leo
read outline in 0.29 seconds

wrote recent file: /home/user/.leo/.leoRecentFiles.txt
 saved: SL2020.leo
wrote: /home/user/Documents/SL/2020/11/CW45/LE-2020-11-06.html.txt
stylesheet not found <- !!!
 /home/user/Documents/default.css <- !!!
@path: /home/user/Documents
open path: /home/user/Documents
wrote: /home/user/Documents/SL/2020/11/CW45/LE-2020-11-06.html
rst3: 1 files in 0.05 sec.
###

I've tried to attempt to disable any renderer, i.e. the 'VR' as well as the 
'VR3' plugin in the 'myLeoSettings' file.

The result was somewhat surprising (at least to me) in that the menu / user 
action 'Help > Open help Topics > Help' continues to work.

My current working theory is that as a user I can't disable **each & 
every** plugins.

That is, there's still a set of '?mandatory core?' plugins, which Leo keeps 
active at all time.

That's all that I can provide as a response from my side for now.

With kind regards,

Viktor

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b67feff3-fa06-4b44-bf93-471cfa13c40cn%40googlegroups.com.


Leo Themes with VR3

2020-11-04 Thread Thomas Passin
It has been pointed out that VR3 does not pick up dark Leo themes, like the 
current default EKRDark.  Viewrendered, on the other hand, does.  I've been 
looking at addressing this, and could use some help on a few things.

First of all, I haven't been able to see how the Leo theme gets applied to 
VR.  So far as I can see, VR emits html that has no css styling at all; 
presumably the pane somehow uses the theme's style sheet.  But when I 
disable the normal stylesheet in VR3, the dark theme is not applied.  You 
can see that it is applied to the overall pane itself (for example the 
toolbar, which is a QT Widget), but as the browser first paints you can see 
the background change from the theme's dark to the usual light background.  
Yet the code for loading and displaying the browser in the pane is 
basically identical between the two plugins.

Somewhere I'm overlooking a difference.  If anyone can help with this, I'd 
much appreciate it.

Second, even if the theme were to be applied, VR3 colorizes code blocks 
using pygments.  One would have to programmatically switch css style sheets 
for pygments to be something compatible with a dark theme.  There are dark 
pygmentize themes out there, though I don't know if they cover all the 
languages that VR3 can render.  Probably they do but it needs checking.  

With this route, VR3 could have a dark theme and a light theme, but it 
couldn't adjust to an arbitrary user-supplied Leo theme.  I'm thinking that 
this would be acceptable.  I'd like some guidance here -  am I on track 
with this way of thinking?

Tom

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/fc3feb6e-943f-496e-9c82-0c71108483d2o%40googlegroups.com.


Re: New Themes

2019-08-23 Thread Chris George
Heh.

Working with snap I have hosed my root filesystem twice with complete,
fresh reinstalls.

So my default is pristine.

Chris

On Fri, Aug 23, 2019 at 9:09 AM Matt Wilkie  wrote:

> After using venv, pyenv, and conda and having them all display the same
>> problems I can pretty much say that it has nothing to do with the pyqt
>> version and everything to do with virtual python environments.
>>
>> When you did your testing were you using a virtual environment? If so,
>> which one?
>>
>
> Conda (via miniconda3).It's very curious that it only occurs in virtuals,
> and that it is the same in all virtuals.
>
> I can't test outside virtual because I can't run Leo on my Linux machine
> using the system python. Through some combination of using `sudo pip
> install ...` and `pip install --user` when I should have used the opposite
> the py env is messed up. I've spent hours trying to figure out how to
> revert to stock and gave up, running to the sanctuary of conda.
>
> matt
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/ff7d1d4c-85e4-45ba-a2ee-aff043f5c811%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CADWQas1XVXopTg%3DJBY77dqiTZSkrfmdj_k-KpvrDMiS8DuXJuQ%40mail.gmail.com.


Re: New Themes

2019-08-23 Thread Matt Wilkie

>
> After using venv, pyenv, and conda and having them all display the same 
> problems I can pretty much say that it has nothing to do with the pyqt 
> version and everything to do with virtual python environments.
>
> When you did your testing were you using a virtual environment? If so, 
> which one?
>

Conda (via miniconda3).It's very curious that it only occurs in virtuals, 
and that it is the same in all virtuals. 

I can't test outside virtual because I can't run Leo on my Linux machine 
using the system python. Through some combination of using `sudo pip 
install ...` and `pip install --user` when I should have used the opposite 
the py env is messed up. I've spent hours trying to figure out how to 
revert to stock and gave up, running to the sanctuary of conda. 

matt

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ff7d1d4c-85e4-45ba-a2ee-aff043f5c811%40googlegroups.com.


Re: New Themes

2019-08-23 Thread Edward K. Ream
On Tue, Aug 20, 2019 at 10:44 AM Chris George  wrote:

It looks like the themes are supplanting font info but not anything else.
>

I agree.  That's why I created #1298
<https://github.com/leo-editor/leo-editor/issues/1298>.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3WVTm-D8dxiK56O_8V642q1sozhsEgLf0ijHTR2DJHeA%40mail.gmail.com.


Re: New Themes

2019-08-22 Thread Chris George
I have narrowed down the outline issue a baby step further.

After using venv, pyenv, and conda and having them all display the same
problems I can pretty much say that it has nothing to do with the pyqt
version and everything to do with virtual python environments.

When you did your testing were you using a virtual environment? If so,
which one?

Chris

On Thu, Aug 22, 2019 at 4:33 PM Matt Wilkie  wrote:

>
>>>- Default font size much too large, everything is pretty squished.
>>>In screenshot below compare the window manager title with Leo's tab 
>>> title.
>>>
>>> I dropped it by 1px across the board and could probably go smaller. At
>> 1920x1080 my eyes just aren't that good anymore. :-)
>>
>
> I keep wishing there were a straightforward way to set Base Size in one
> place and then have everything else scale relative to that. Way back when
> CCS2 first came out I thought that was nailed with introduction of relative 
> *em
> *and *en*'s, let alone %. Sadly for (what a presume are real) reasons
> beyond my ken that has yet to materialize.
>
>
>>
>>
>>- the button row icons are 3 different shapes, background colours and
>>fills, and sizes.
>>
>> I don't use chapters so I had disabled them via @bool. Fixed.
>>
>
> Ditto. It's one of those widgets I've never known what were for but
> assumed must be good for something so left alone for some later
> exploration. I didn't know it could be disabled.
>
>
>
>> Thanks for the input.
>>
>
> You're welcome. I hope it didn't come across as too negative. It's so much
> easier to describe the funny or broken things ;-)
>
> matt
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/aedbcadf-6da8-4ccb-a50a-ee8c959e425a%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CADWQas1-XTCUdHv7eS2koqPr5dMoOyqUwumX8AtButkF9fruWg%40mail.gmail.com.


Re: New Themes

2019-08-22 Thread Matt Wilkie

>
>
>>- Default font size much too large, everything is pretty squished. In 
>>screenshot below compare the window manager title with Leo's tab title.
>>
>> I dropped it by 1px across the board and could probably go smaller. At 
> 1920x1080 my eyes just aren't that good anymore. :-)
>

I keep wishing there were a straightforward way to set Base Size in one 
place and then have everything else scale relative to that. Way back when 
CCS2 first came out I thought that was nailed with introduction of relative *em 
*and *en*'s, let alone %. Sadly for (what a presume are real) reasons 
beyond my ken that has yet to materialize.
 

>  
>
>- the button row icons are 3 different shapes, background colours and 
>fills, and sizes.
>
> I don't use chapters so I had disabled them via @bool. Fixed.
>

Ditto. It's one of those widgets I've never known what were for but assumed 
must be good for something so left alone for some later exploration. I 
didn't know it could be disabled.
 
 

> Thanks for the input.
>
 
You're welcome. I hope it didn't come across as too negative. It's so much 
easier to describe the funny or broken things ;-)

matt

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/aedbcadf-6da8-4ccb-a50a-ee8c959e425a%40googlegroups.com.


Re: New Themes

2019-08-22 Thread Chris George




> *General*
>
>- Default font size much too large, everything is pretty squished. In 
>screenshot below compare the window manager title with Leo's tab title.
>
> I dropped it by 1px across the board and could probably go smaller. At 
1920x1080 my eyes just aren't that good anymore. :-)
 

>
>- The pin/unpin and close control icons at each panels top right 
>corner are just a jumble, not a recognisable picture or shape.
>
> This is related to the PyQt5 version issue which I will explore next. The 
solution so far is to not use a virtual python environment.
 

>
>- the button row icons are 3 different shapes, background colours and 
>fills, and sizes.
>
> I don't use chapters so I had disabled them via @bool. Fixed.
 

>
>- The red "Leo Log Window" text is a bit hard to look at, I find my 
>eyes kind of jittering over it.
>
> I brightened it a bit. Let me know what you think.
 

>
>- Menu drop downs: the dark background showing between each of the 
>menu items makes little jail cells around everything, drawing my focus 
>aware from the letters. Maybe the whitespace between items could be 
>collapsed to zero, or just made much thinner. (I haven't figured out how 
> to 
>get a screenshot of an open menu yet. Hope my description makes sense.)
>
> I changed the background of the menu itself to the gradient and made the 
gap smaller and it seems to be a lot easier on the eyes.

Thanks for the input.

Chris

 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/bda545a2-bdce-4559-9bea-130b6055240e%40googlegroups.com.


Re: New Themes

2019-08-21 Thread Chris George
nb. The dock title bar icons work fine with Python 3.6.8 and PyQt 5.12.3.

Chris

On Wed, Aug 21, 2019 at 7:49 PM Chris George  wrote:

> Curiouser and *curiouser*.
>
> My distribution default is Python 3.6.8 and PyQt 5.12.3. This combination
> works just fine to run Leo and the two outline problems, headline box and
> blue background to the left of selected headlines, don't happen.
>
> If I install PyQt5==5.12.2 to my user directory using pip3, Leo reports
> PyQt 5.12.3 and displays the problems.
>
> So I fire up conda with Python 3.7.3 and PyQt version 5.9.6 and it
> displays the problems.
>
> So at this point, the problem appears to be not with the version of PyQt
> but either the versions coming from PyPi (I tried several versions) or the
> fact that it is a virtual python environment.
>
> I am not sure which would be worse.
>
> I will stick with my distribution default for now and work on the rest of
> the problems before I come back to this. Perhaps someone on a different
> platform could do a little testing to see if we can narrow this down.
>
> Chris
>
> On Wed, Aug 21, 2019 at 7:14 PM Chris George  wrote:
>
>>
>>
>> Python 3.6.8 and PyQt 5.13.0 display the problems.
>>
>> Python 3.6.8 and PyQt 5.12.3 do not.
>>
>> Sigh. Time to read the changelog.
>>
>> Chris
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/leo-editor/f990d8d0-d5a1-4ab8-b9f4-2b39e392963b%40googlegroups.com
>> 
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CADWQas0vMJEsPcEEXMDy-T2HUOqiWe6Wu4DkZcHbY4YNTVr%3DWw%40mail.gmail.com.


Re: New Themes

2019-08-21 Thread Chris George
Curiouser and *curiouser*.

My distribution default is Python 3.6.8 and PyQt 5.12.3. This combination
works just fine to run Leo and the two outline problems, headline box and
blue background to the left of selected headlines, don't happen.

If I install PyQt5==5.12.2 to my user directory using pip3, Leo reports
PyQt 5.12.3 and displays the problems.

So I fire up conda with Python 3.7.3 and PyQt version 5.9.6 and it displays
the problems.

So at this point, the problem appears to be not with the version of PyQt
but either the versions coming from PyPi (I tried several versions) or the
fact that it is a virtual python environment.

I am not sure which would be worse.

I will stick with my distribution default for now and work on the rest of
the problems before I come back to this. Perhaps someone on a different
platform could do a little testing to see if we can narrow this down.

Chris

On Wed, Aug 21, 2019 at 7:14 PM Chris George  wrote:

>
>
> Python 3.6.8 and PyQt 5.13.0 display the problems.
>
> Python 3.6.8 and PyQt 5.12.3 do not.
>
> Sigh. Time to read the changelog.
>
> Chris
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/f990d8d0-d5a1-4ab8-b9f4-2b39e392963b%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CADWQas1ygnfeBP_0Q_WJKUOPim1S_109%2BFSfi98UnOVJTBEhgw%40mail.gmail.com.


Re: New Themes

2019-08-21 Thread Chris George


Python 3.6.8 and PyQt 5.13.0 display the problems.

Python 3.6.8 and PyQt 5.12.3 do not.

Sigh. Time to read the changelog.

Chris

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f990d8d0-d5a1-4ab8-b9f4-2b39e392963b%40googlegroups.com.


Re: New Themes

2019-08-21 Thread Chris George
Matt,

What version of PyQt are you using?

With Python 3.6.8 and PyQt version 5.12.3, I do not see the headline lines 
or the light blue bits to the left of the selected node.

With Python 3.7.4 and PyQt 5.13.0, I do.

I will fiddle here to see why that might be.

Chris

On Monday, August 19, 2019 at 5:52:51 PM UTC-7, Matt Wilkie wrote:
>
> Thank you for tackling and sharing this Chris. Feedback to come when I 
>> finish catching up on the last month or so of activity that I've been apart 
>> from. A lot has happened!
>>
>
> Well I'm not caught up, but have started exploring the themes anyway ;-)
>
> *ZephyrDark* on Linux Mint 18 laptop, resolution 1366x768
>
> I like the overall colour tones. The contrast is high enough for my so-so 
> eyes, but I'll have to wait until I've used for quite awhile to know for 
> sure.
>
> *General*
>
>- Default font size much too large, everything is pretty squished. In 
>screenshot below compare the window manager title with Leo's tab title.
>- The pin/unpin and close control icons at each panels top right 
>corner are just a jumble, not a recognisable picture or shape.
>- the button row icons are 3 different shapes, background colours and 
>fills, and sizes.
>- The red "Leo Log Window" text is a bit hard to look at, I find my 
>eyes kind of jittering over it.
>- Menu drop downs: the dark background showing between each of the 
>menu items makes little jail cells around everything, drawing my focus 
>aware from the letters. Maybe the whitespace between items could be 
>collapsed to zero, or just made much thinner. (I haven't figured out how 
> to 
>get a screenshot of an open menu yet. Hope my description makes sense.)
>
> *Outline:*
>
>- In outline tree's selected node there is a thin line black box 
>within the overall "this is selected" highlight that over posts the 
>headline text. This black line box is only visible when the tree has focus.
>- The blue background of the selected node icon closed/expanded 
>indicator doesn't fit with the theme colour pallette.
>
>
>
> 
> After an hour or so, I quite like it. It's my main theme on this machine 
> for the time being.
>
> -matt
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/6e3c65c0-da42-4670-87fd-48722f0fba58%40googlegroups.com.


Re: New Themes

2019-08-20 Thread Edward K. Ream
On Tue, Aug 20, 2019 at 3:00 PM Matt Wilkie  wrote:

> Blue sky: I'd like to be able to run `show-settings` into a Leo panel,
>> that has a filter category buttons plus a text field at top. From there I
>> could 2x-click or [enter] on any given setting and be taken to the location
>> where that is currently defined (LeoSettings, myLeoSettings,
>> MyCoolTheme.leo, ThisLeofile.leo). At which point I could change as needed.
>> If this place happens to be a System setting (not mysettings or local leo
>> file) then my changes are saved/moved to the next level down. (Or answer a
>> prompt which asks at which level to save the setting.)
>>
>
Interesting ideas.  Not sure when, or if, I'll get to them.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0o2nCWupwsLZKDbNherXxMCXd0o7tTU1a4H-QYYi%3D-8g%40mail.gmail.com.


Re: New Themes

2019-08-20 Thread Matt Wilkie

>
> Blue sky: I'd like to be able to run `show-settings` into a Leo panel, 
> that has a filter category buttons plus a text field at top. From there I 
> could 2x-click or [enter] on any given setting and be taken to the location 
> where that is currently defined (LeoSettings, myLeoSettings, 
> MyCoolTheme.leo, ThisLeofile.leo). At which point I could change as needed. 
> If this place happens to be a System setting (not mysettings or local leo 
> file) then my changes are saved/moved to the next level down. (Or answer a 
> prompt which asks at which level to save the setting.)
>

I decided this merited an enhancement issue entry: 
https://github.com/leo-editor/leo-editor/issues/1294

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/2973a9ba-73f9-4ec6-a7db-13c1704a9b60%40googlegroups.com.


Re: New Themes

2019-08-20 Thread Matt Wilkie

>
> I have always thought it rather puzzling to have self-contained themes and 
> then an entirely different way to set fonts.
>
My preference is to set everything related to UI in the theme. 
>

I agree, all UI elements should be in one place. However people shouldn't 
have to wade through tons of nodes to adjust basics like font-size and 
-family. A convention to always have these as cloned nodes at the top of 
the theme.leo would help.

For all-ui-in-theme approach the menu "Settings >> Edit Settings >> ***" 
would need to copy to the active theme instead of myLeoSettings. (Maybe not 
a significant barrier; I don't know.)

The cascade of "Settings >> My Settings >> This Leo File Settings" is a 
core principle and applies to just about everything. I think we can/should 
use this in UI as well. Theming confuses things because it's off to the 
side somewhere and isn't clear (to me) where it fits in the cascade.

Blue sky: I'd like to be able to run `show-settings` into a Leo panel, that 
has a filter category buttons plus a text field at top. From there I could 
2x-click or [enter] on any given setting and be taken to the location where 
that is currently defined (LeoSettings, myLeoSettings, MyCoolTheme.leo, 
ThisLeofile.leo). At which point I could change as needed. If this place 
happens to be a System setting (not mysettings or local leo file) then my 
changes are saved/moved to the next level down. (Or answer a prompt which 
asks at which level to save the setting.)

-matt



-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f0e1efe7-c124-4cc8-adc3-c3f96ce99e7f%40googlegroups.com.


Re: New Themes

2019-08-20 Thread Terry Brown
There is the Ctrl-+/- / Ctrl-mousewheel font zoom functionality to
consider.  I don't think it was incompatible with themes, it just required
specific naming conventions... maybe, I don't remember the details.
Anyway, just pointing out that factor's in there to be considered.

Cheers -Terry

On Tue, Aug 20, 2019 at 10:44 AM Chris George  wrote:

> It looks like the themes are supplanting font info but not anything else.
> For example, if I specify a setting in a theme file it gets overridden by
> myLeoSettings.leo which is the expected behaviour. Having the font info in
> a theme override that is inconsistent but could/should be offered as a
> choice. Or we should pick one way of doing it and eliminate the choice.
>
> I have always thought it rather puzzling to have self-contained themes and
> then an entirely different way to set fonts.
>
> My preference is to set everything related to UI in the theme.
>
> I think that choice is Leonine. Whenever I propose a new way to do
> something I try to phrase it such that there should always be an @bool to
> offer choice so people can bend Leo to their own preferences. I believe
> that the default should be the theme as it gives new users one place to go
> to modify their UI experience.
>
> I have totally ignored the entire "other way" as it may well be someone
> else's preference. But for new users, it is terribly confusing.
>
> Chris
>
> On Tue, Aug 20, 2019 at 6:50 AM Edward K. Ream 
> wrote:
>
>>
>>
>> On Tue, Aug 20, 2019 at 8:32 AM Matt Wilkie  wrote:
>>
>>> A structural problem: theme font-size overrides myLeoSettings.leo, which
>>> I assume applies for all settings. I expect myLeoSettings to always have
>>> the last say.
>>>
>>
>> Hmm.  I'm not sure what I expect.
>>
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/leo-editor/CAMF8tS03aB3BDf%3DTDKei80NCXWrw61Tpq2bYN3UBQ_iPrn%3DV9Q%40mail.gmail.com
>> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS03aB3BDf%3DTDKei80NCXWrw61Tpq2bYN3UBQ_iPrn%3DV9Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CADWQas0RPe-Qsm3%2Ba1rYkb%3D_v496KFKZRXZkMnPd1-A%3DmPp2-g%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CADWQas0RPe-Qsm3%2Ba1rYkb%3D_v496KFKZRXZkMnPd1-A%3DmPp2-g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAFPg46TddBoBk2pWgDWofEPMjoatmqAZne5znoKT8PMh%3Dm39Qw%40mail.gmail.com.


Re: New Themes

2019-08-20 Thread Chris George
It looks like the themes are supplanting font info but not anything else.
For example, if I specify a setting in a theme file it gets overridden by
myLeoSettings.leo which is the expected behaviour. Having the font info in
a theme override that is inconsistent but could/should be offered as a
choice. Or we should pick one way of doing it and eliminate the choice.

I have always thought it rather puzzling to have self-contained themes and
then an entirely different way to set fonts.

My preference is to set everything related to UI in the theme.

I think that choice is Leonine. Whenever I propose a new way to do
something I try to phrase it such that there should always be an @bool to
offer choice so people can bend Leo to their own preferences. I believe
that the default should be the theme as it gives new users one place to go
to modify their UI experience.

I have totally ignored the entire "other way" as it may well be someone
else's preference. But for new users, it is terribly confusing.

Chris

On Tue, Aug 20, 2019 at 6:50 AM Edward K. Ream  wrote:

>
>
> On Tue, Aug 20, 2019 at 8:32 AM Matt Wilkie  wrote:
>
>> A structural problem: theme font-size overrides myLeoSettings.leo, which
>> I assume applies for all settings. I expect myLeoSettings to always have
>> the last say.
>>
>
> Hmm.  I'm not sure what I expect.
>
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS03aB3BDf%3DTDKei80NCXWrw61Tpq2bYN3UBQ_iPrn%3DV9Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS03aB3BDf%3DTDKei80NCXWrw61Tpq2bYN3UBQ_iPrn%3DV9Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CADWQas0RPe-Qsm3%2Ba1rYkb%3D_v496KFKZRXZkMnPd1-A%3DmPp2-g%40mail.gmail.com.


Re: New Themes

2019-08-20 Thread Edward K. Ream
On Tue, Aug 20, 2019 at 8:32 AM Matt Wilkie  wrote:

> A structural problem: theme font-size overrides myLeoSettings.leo, which I
> assume applies for all settings. I expect myLeoSettings to always have the
> last say.
>

Hmm.  I'm not sure what I expect.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS03aB3BDf%3DTDKei80NCXWrw61Tpq2bYN3UBQ_iPrn%3DV9Q%40mail.gmail.com.


Re: New Themes

2019-08-20 Thread Matt Wilkie
A structural problem: theme font-size overrides myLeoSettings.leo, which I 
assume applies for all settings. I expect myLeoSettings to always have the 
last say.

Oh that's interesting, the `show-settings` command does not report base 
font settings, e.g. @font-size, @medium-font-size, etc. Neither does the 
report indicate which settings are set by a theme file.

-matt

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/e4ea9ae6-459b-4454-801e-3c5676a31dbb%40googlegroups.com.


Re: New Themes

2019-08-19 Thread Chris George
Thanks, Matt.

Now that docks have settled down I can work on theming them to be more
consistent. I will poke at the rest and prepare an update.

Chris

On Mon, Aug 19, 2019 at 5:52 PM Matt Wilkie  wrote:

> Thank you for tackling and sharing this Chris. Feedback to come when I
>> finish catching up on the last month or so of activity that I've been apart
>> from. A lot has happened!
>>
>
> Well I'm not caught up, but have started exploring the themes anyway ;-)
>
> *ZephyrDark* on Linux Mint 18 laptop, resolution 1366x768
>
> I like the overall colour tones. The contrast is high enough for my so-so
> eyes, but I'll have to wait until I've used for quite awhile to know for
> sure.
>
> *General*
>
>- Default font size much too large, everything is pretty squished. In
>screenshot below compare the window manager title with Leo's tab title.
>- The pin/unpin and close control icons at each panels top right
>corner are just a jumble, not a recognisable picture or shape.
>- the button row icons are 3 different shapes, background colours and
>fills, and sizes.
>- The red "Leo Log Window" text is a bit hard to look at, I find my
>eyes kind of jittering over it.
>- Menu drop downs: the dark background showing between each of the
>menu items makes little jail cells around everything, drawing my focus
>aware from the letters. Maybe the whitespace between items could be
>collapsed to zero, or just made much thinner. (I haven't figured out how to
>get a screenshot of an open menu yet. Hope my description makes sense.)
>
> *Outline:*
>
>- In outline tree's selected node there is a thin line black box
>within the overall "this is selected" highlight that over posts the
>headline text. This black line box is only visible when the tree has focus.
>- The blue background of the selected node icon closed/expanded
>indicator doesn't fit with the theme colour pallette.
>
>
>
> 
> After an hour or so, I quite like it. It's my main theme on this machine
> for the time being.
>
> -matt
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/3b85f783-85d7-4155-9cb6-b63c2a541226%40googlegroups.com
> <https://groups.google.com/d/msgid/leo-editor/3b85f783-85d7-4155-9cb6-b63c2a541226%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CADWQas3m0jmv2m1Hit87bTkspq_uyUe92EKZWY9czny3sZ8WXw%40mail.gmail.com.


Re: New Themes

2019-08-19 Thread Matt Wilkie

>
> Thank you for tackling and sharing this Chris. Feedback to come when I 
> finish catching up on the last month or so of activity that I've been apart 
> from. A lot has happened!
>

Well I'm not caught up, but have started exploring the themes anyway ;-)

*ZephyrDark* on Linux Mint 18 laptop, resolution 1366x768

I like the overall colour tones. The contrast is high enough for my so-so 
eyes, but I'll have to wait until I've used for quite awhile to know for 
sure.

*General*

   - Default font size much too large, everything is pretty squished. In 
   screenshot below compare the window manager title with Leo's tab title.
   - The pin/unpin and close control icons at each panels top right corner 
   are just a jumble, not a recognisable picture or shape.
   - the button row icons are 3 different shapes, background colours and 
   fills, and sizes.
   - The red "Leo Log Window" text is a bit hard to look at, I find my eyes 
   kind of jittering over it.
   - Menu drop downs: the dark background showing between each of the menu 
   items makes little jail cells around everything, drawing my focus aware 
   from the letters. Maybe the whitespace between items could be collapsed to 
   zero, or just made much thinner. (I haven't figured out how to get a 
   screenshot of an open menu yet. Hope my description makes sense.)
   
*Outline:*

   - In outline tree's selected node there is a thin line black box within 
   the overall "this is selected" highlight that over posts the headline text. 
   This black line box is only visible when the tree has focus.
   - The blue background of the selected node icon closed/expanded 
   indicator doesn't fit with the theme colour pallette.




After an hour or so, I quite like it. It's my main theme on this machine 
for the time being.

-matt

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/3b85f783-85d7-4155-9cb6-b63c2a541226%40googlegroups.com.


Re: New Themes

2019-07-07 Thread Matt Wilkie
Thank you for tackling and sharing this Chris. Feedback to come when I 
finish catching up on the last month or so of activity that I've been apart 
from. A lot has happened!

-matt

-- 
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 https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/222ede60-73fb-4c65-93a8-432742b12f81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New Themes

2019-06-21 Thread Edward K. Ream
On Fri, Jun 21, 2019 at 8:04 AM Chris George  wrote:

> I am stuck. I can't for the life of me figure out what the changes in the
> second commit have to do with it.
>

Ok.  I'll look at it when I can.

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 https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1O_2QaXSpyScCJuGu92pWb0Ls%3DQHMXvthM7qUGxt0Csg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: New Themes

2019-06-21 Thread Chris George
I am stuck. I can't for the life of me figure out what the changes in the
second commit have to do with it.

Chris

On Fri, Jun 21, 2019 at 4:58 AM Edward K. Ream  wrote:

> On Thu, Jun 20, 2019 at 10:39 PM Chris George 
> wrote:
>
> Two new themes are available in leo/themes: BreezeDark2 and Zepyhr Dark.
>>
>
> Many thanks for this work.  What is the status of #1218
> <https://github.com/leo-editor/leo-editor/issues/1218>?
>
> 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 https://groups.google.com/group/leo-editor.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS3-ZK2p9UQ_BtAS2-n5Xrp6WSWsd-osrq1YnezoZs9-Tg%40mail.gmail.com
> <https://groups.google.com/d/msgid/leo-editor/CAMF8tS3-ZK2p9UQ_BtAS2-n5Xrp6WSWsd-osrq1YnezoZs9-Tg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CADWQas0mwp9H-6zMWFv%3DhzPDGg_5XEndXc06FnZ%3DAwfB_G2BpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: New Themes

2019-06-21 Thread Edward K. Ream
On Thu, Jun 20, 2019 at 10:39 PM Chris George  wrote:

Two new themes are available in leo/themes: BreezeDark2 and Zepyhr Dark.
>

Many thanks for this work.  What is the status of #1218
<https://github.com/leo-editor/leo-editor/issues/1218>?

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 https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3-ZK2p9UQ_BtAS2-n5Xrp6WSWsd-osrq1YnezoZs9-Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


New Themes

2019-06-20 Thread Chris George
Two new themes are available in leo/themes: BreezeDark2 and Zepyhr Dark.

An update to Breeze Dark to accomodate dock widgets and refresh the look.

A new dark theme, Zephyr, based on Breeze Dark (that was a lot of work) 
with a new colour scheme and a few new wrinkles.

Feedback is required. Please let me know about undocumented anomalies via 
Issue #1219 <https://github.com/leo-editor/leo-editor/issues/1219>.

Chris

-- 
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 https://groups.google.com/group/leo-editor.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/0892f7d2-45f1-4a34-9f2b-91593758d58d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ENB: Prototyping themes without changing code

2018-04-02 Thread Edward K. Ream
On Sat, Mar 31, 2018 at 12:44 PM, Thomas Passin  wrote:

> Even easier: Turn the @settings node headline into @@settings.  Now there
> are no settings to load.  You can even start a new, clean @settings tree,
> all without renaming the file.
>

​An excellent idea. Once that works you should be able to enable all
settings except appearance-related settings.

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


Re: ENB: Prototyping themes without changing code

2018-03-31 Thread Thomas Passin
Even easier: Turn the @settings node headline into @@settings.  Now there 
are no settings to load.  You can even start a new, clean @settings tree, 
all without renaming the file.

On Saturday, March 17, 2018 at 8:07:55 PM UTC-4, Edward K. Ream wrote:
>
>
>
>
> *Part 2: Disable myLeoSettings.leo*Even though I'm running the F5 script 
> from one copy of Leo, I can disable myLeoSettings.leo by renaming it.  
>

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


FYI: will remove themes/test_*.leo

2018-03-24 Thread Edward K. Ream
Recent work has eliminated the need for these files.  Let me know if you 
want any retained.  I plan to delete these files tomorrow.

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


ENB: Fixing newly-broken themes

2018-03-21 Thread Edward K. Ream
An engineering notebook, thinking out loud about fixing Terry's theme 
problems. And everyone else's. Recent changes must not break *any* existing 
themes!

Terry reports the first bad commit is 852d8e40:
Start to generalize qt_gui.getImageFinder using theme globals

Happily, there are only two small diffs. Here they are, without cruft:

*1. LeoQtGui.reloadSettings nodes no longer sets a color_theme ivar.*

 def reloadSettings(self):
-self.color_theme = g.app.config and 
g.app.config.getString('color_theme')
+pass
+# Replace .color_theme ivar by g.app.theme_color global.

*2. LeoQtGui.getImageFinder uses g.app.theme_color instead of .color_theme*

+color = g.app.theme_color
...
 fullname = g.os_path_finalize_join(
-        base_dir, 'themes', self.color_theme, 'Icons', 
namepart)
+base_dir, 'themes', color, 'Icons', namepart)

And that's it!

So now the question is, exactly *how *will g.app.theme_color be different 
from .color_theme, that is, g.app.config.getString('color_theme'), and *why* 
does that matter?

*Important*: LeoQtGui.color_theme was set using *g.app.config*.getString, 
not *c.config*.getString. c is not available in the LeoQtGui class!

Iirc, g.app.config gets settings only from leoSettings.leo and 
myLeoSettings.leo. 

*Discovery*. A number of cff's, starting with color_theme, reveal that 
ssm.get_stylesheet and its helpers are no longer used! cff's confirm that 
only ssm.get_stylesheet calls its helpers. As a result, I have retired 
ssm.get_stylesheet, including all its helpers.

This retirement eliminates *all* remaining uses of the .color_theme ivar.  
We can now confidently conclude that using g.app.theme instead of 
c.config.getString('color_theme') somehow is the culprit.

*Setting g.app.theme_color*

Only LM.readGlobalSettingsFiles sets g.app.theme_color. It calls 
LM.computeThemeFilePath, which returns a path (if any) to *one* theme file.

LM.computeThemeFilePath computes path to the theme file as follows:

1. It uses the path in the --theme command-line option, if given, even if 
2. Otherwise, it uses @string theme-*name* from only the *first* loaded 
file.
3. Finally, if uses @string theme-*name* from myLeoSettings.leo.

LM.computeThemeFilePath did not change in the first bad commit, so it can't 
be the proximate cause of the bug.  That is, the fine details of how it 
works can not the issue here.


*Summary*
The old LeoQtGui.color_theme ivar was set from 
g.app.config.getString('color_*theme*'), while g.app.theme_name uses code 
equivalent to g.app.config.getString('color_*name*').

*Prediction*: Terry could fix the problem by using --theme or by setting 
@string theme-*name* in his myLeoSettings.leo file.I'll change no code 
until Terry confirms or denies this prediction.

Reverting to initing and using the LeoQtGui.color_theme ivar might "just 
work" *except* that it would not support the --theme.  I'll choose exactly 
what to do after knowing more.

I would like to replace the two theme-related settings with a single 
setting. This might have tricky compatibility implications.  It may be that 
I shall deprecate one setting, while remaining compatibility indefinitely.

All questions and comments welcome.

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


Summary of themes-related work

2018-03-20 Thread Edward K. Ream
Here is the summary of recent themes work. This will be pre-writing for new 
themes documentation.

1. [Today] Rev 168d79c0 converts all relative url's in stylesheets to 
absolute paths.  This may fix #808 
<https://github.com/leo-editor/leo-editor/issues/808>. I have just close 
it. Please reopen if necessary. The new code is in ssm.resolve_urls. If 
problems remain in the stylesheet, you can enable tracing in resolve_urls 
to see exactly what is happening.

2. [Yesterday] Leo now loads theme files *early* in the load process. This 
is the only way to hand syntax-coloring settings properly.

The @theme-name setting is now roughly equivalent to the --theme=name 
command-line option.  Both cause the named file to be loaded *as a settings 
file*.

3. [Ongoing] The leo/themes folders now contains three themes and three 
helper test files, for optional use by theme devs. I have been making small 
tweaks to Chris George's theme to keep track with infrastructure work.

Imo, it's useful to use stand-alone settings files, especially when 
developing themes.  Otoh, defining themes in myLeoSettings.leo works as 
before and will never be deprecated.  Defining themes in myLeoSettings.leo 
will be just a tad faster than using an external theme file, but that 
should not be of great concern.

4. The Themes menu contains a single menu item: Open Theme File. This will 
soon be renamed to something like "View Theme".  It doesn't deserve a menu 
all to itself, so it will move to the Settings menu.

*Change*: Open Theme File now opens the selected file in a separate 
process.  This should suffice to demo the theme. The command no longer 
makes "live" changes to Leo's appearance.  Such changes were always bogus.

*Change*: The Open Theme File command executes "leo , which 
means that "leo" must be an executable script.  Not sure how to eliminate 
this dependency.

*Summary*

Leo now supports the --theme command-line argument and the @string 
theme-name setting.  Both load the named theme file early in Leo's startup 
process. Defining themes in myLeoSettings.leo will continue to work as 
before. Doing so will never be deprecated.

The leo/themes folder contains three themes.  I plan to add no further 
theme files, but I encourage others to do so.

The Open Theme File menu item merely demos themes.  It will be renamed and 
move to the Settings menu.

Theme-related code is difficult, but it is now about as clean as can be 
expected. Problems may remain. All questions, comments and bug reports are 
welcome.

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


Re: 73152a5: `@string theme-name = name` completes themes work

2018-03-18 Thread Edward K. Ream
On Sun, Mar 18, 2018 at 4:29 PM, Edward K. Ream  wrote:

Leo now supports
>> ​​
>> @string theme-name=name. This has about the same effect as --theme=name.
>> The command-line option takes precedence if both are specified.
>>
>
​Rev b889f10 makes both --theme and
​
@string theme-name work properly by updating all settings from the theme
file immediately after reading myLeoSettings.leo.

Updating the settings early in the load process ensures​ that *all*
settings take effect for all loaded files.  In particular, the new code
inits syntax coloring colors correctly.

I have confidence that the new scheme is sound.  All the new code resides
in the LoadManager class where it belongs.

*Still to do*

1. Various straightforward cleanups of the StyleSheetManager class.

2. It is now obvious that the present Themes menu is a fake.  Yes, loading
themes is glitzy, but syntax colors are not updated properly. Imo the
Themes menu should just demo themes by opening the selected theme file in a
new process.  This will load all settings properly and should be completely
accurate representation of the theme.

I expect to complete the remaining work soon.  It's time to move on.

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


Re: 73152a5: `@string theme-name = name` completes themes work

2018-03-18 Thread Edward K. Ream
On Sunday, March 18, 2018 at 2:29:53 PM UTC-5, Edward K. Ream wrote:
>
> Leo now supports @string theme-name=name. This has about the same effect 
> as --theme=name.  The command-line option takes precedence if both are 
> specified.
>

At present neither works well enough. For now I don't recommend using 
either.

Both these settings should, in effect, override corresponding settings in 
myLeoSettings.leo. This should be done *before* loading files, not 
afterwards so that, for example, syntax coloring settings are inited 
properly. This may be fairly easy to do. Or not.

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


73152a5: `@string theme-name = name` completes themes work

2018-03-18 Thread Edward K. Ream
Leo now supports @string theme-name=name. This has about the same effect as 
--theme=name.  The command-line option takes precedence if both are 
specified.

I plan no further substantive work on the themes machinery itself. I shall 
be closing all theme-related issues soon.

One could imagine lots of bells and whistles, but I shall consider adding 
them only if there is a real need.  Imo, that's unlikely.  For example, one 
could image a theme that merely increases font sizes.  That might be 
vaguely useful, but it would be easy enough to create your own custom theme 
with larger sizes. It's time to move on.

I encourage further work on the themes themselves.  The leo/themes 
directory should have more of them.

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


ENB: Prototyping themes without changing code

2018-03-17 Thread Edward K. Ream
This is an Engineering Notebook post.  It describes recent thoughts and 
test.

Recently I been struggling to understand what, exactly, any new theme code 
should do.

*Aha*: I can test themes without altering a line of code!  There are two 
parts of this strategy...

*Part 1: Use a minimal test file*

The *test_theme.bat* script *simulates* difficult theme-related code by 
loading two files, a very small test file, *test_theme.leo*, and an actual 
theme file, say EKRLight.leo.

test_theme.leo contains nothing but settings that we *don't *want to put in 
theme files:

@bool minibuffer_find_mode = False
@bool show-tips = False
@bool use-gutter = False

So now EKRLight.leo contains only an @theme tree, not the settings above.

Finally, I changed the F5 @command script so that it executes 
test_theme.bat.



*Part 2: Disable myLeoSettings.leo*Even though I'm running the F5 script 
from one copy of Leo, I can disable myLeoSettings.leo by renaming it.  
Doing so revealed several unbound @-constants in leoSettings.leo.  They 
have all been fixed.

*Summary*

1. Loading EKRLight.leo *last* is an excellent simulation of theming that 
required *no* changes to the existing theme-related code.  Something like 
this:

leo test_theme.leo EKRLight.leo

The test is even better when myLeoSettings.leo has been disabled.

2. leoSettings.leo now apparently contains no unbound @-constants.  This 
should make testing theme files significantly easier.

3. The script above suggests the way forward. Something like:

leo test_theme.leo --theme=EKRLight.leo

This would load EKRLight.leo last, as required, but would then close 
EKRLight.leo.

Following this super simple strategy is important.  Messing with settings 
will be hard enough.  That's next.

Finally, we can replace --theme by a setting in myLeoSettings.leo.

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


Re: 75b9c9: New Themes menu

2018-03-13 Thread Edward K. Ream
On Mon, Mar 12, 2018 at 5:39 PM, Edward K. Ream  wrote:

> On Mon, Mar 12, 2018 at 3:12 PM, Terry Brown 
> wrote:
>
> Only nit was that it
>> ​ ​
>> didn't start in leo\themes, I had to navigate there, and had to
>> navigate back again even after loading a theme from there.
>> ​
>>
>
​I just created #809 <https://github.com/leo-editor/leo-editor/issues/809>
for this, but I don't see this either on Windows or Linux.

I've assigned you to this.

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


Re: 75b9c9: New Themes menu

2018-03-12 Thread Edward K. Ream
On Mon, Mar 12, 2018 at 3:12 PM, Terry Brown  wrote:


> > This top-level menu has two items: Apply Theme and Open Theme File.
>
> Just tried this in 134975148a78.  Very nice work.


​Thanks
​


> Only nit was that it
> ​ ​
> didn't start in leo\themes, I had to navigate there, and had to
> navigate back again even after loading a theme from there.
> ​
>

​Strange. Not what I intended.  I'll fix it next.

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


Re: 75b9c9: New Themes menu

2018-03-12 Thread Terry Brown
On Mon, 12 Mar 2018 04:00:37 -0700 (PDT)
"Edward K. Ream"  wrote:

> This top-level menu has two items: Apply Theme and Open Theme File.
> 
> Both commands prompt for a theme file, starting in leo\themes, then

Just tried this in 134975148a78.  Very nice work.  Only nit was that it
didn't start in leo\themes, I had to navigate there, and had to
navigate back again even after loading a theme from there.

Cheers -Terry

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


Re: 75b9c9: New Themes menu

2018-03-12 Thread Edward K. Ream
On Mon, Mar 12, 2018 at 10:14 AM, k-hen  wrote:

> Excellent - thank you!
>

​You're welcome.

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


Re: 75b9c9: New Themes menu

2018-03-12 Thread k-hen
Excellent - thank you!

On Monday, March 12, 2018 at 10:57:25 AM UTC-4, Edward K. Ream wrote:
>
>
>
> On Monday, March 12, 2018 at 9:54:19 AM UTC-5, k-hen wrote:
>>
>> This is great :-D A really nice simple enhancement (I think) would be if 
>> we could just apply/reload the *current* file as well rather than having to 
>> save, re-select the file, etc. Or maybe there's a scripting trick that 
>> could do this?
>>
>
> There's *always* a scripting trick ;-)  See this reply 
>  in 
> another thread, about two minutes old. 
>
> 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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: 75b9c9: New Themes menu

2018-03-12 Thread Edward K. Ream


On Monday, March 12, 2018 at 9:54:19 AM UTC-5, k-hen wrote:
>
> This is great :-D A really nice simple enhancement (I think) would be if 
> we could just apply/reload the *current* file as well rather than having to 
> save, re-select the file, etc. Or maybe there's a scripting trick that 
> could do this?
>

There's *always* a scripting trick ;-)  See this reply 
 in 
another thread, about two minutes old. 

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


Re: 75b9c9: New Themes menu

2018-03-12 Thread k-hen
This is great :-D A really nice simple enhancement (I think) would be if we 
could just apply/reload the *current* file as well rather than having to 
save, re-select the file, etc. Or maybe there's a scripting trick that 
could do this?

Kevin


On Monday, March 12, 2018 at 7:00:37 AM UTC-4, Edward K. Ream wrote:
>
> This top-level menu has two items: Apply Theme and Open Theme File.
>
> Both commands prompt for a theme file, starting in leo\themes, then open 
> the file which automatically applies the theme.
>
> The Open Theme File command leaves the theme file open.  The Apply Theme 
> file command closes the theme file.
>
> I'm not sure these two commands are worth a separate top-level menu.  It's 
> probably more logical to put these commands in the Settings menu.  What do 
> you think?
>
> There is more work to be done regarding themes. See #766 
> <https://github.com/leo-editor/leo-editor/issues/766>.
>
> 1.  Allow themes that affect only settings.
> 2.  Allow themes that *add* to stylesheets.  For example, a big-text 
> theme.
> 3.  Support @string initial-theme =  and/or @data 
> initial-themes. See #790 
> <https://github.com/leo-editor/leo-editor/issues/790>.
> 4. Migrate more themes into leo/themes.  This will likely take the most 
> work.
>
> 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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


75b9c9: New Themes menu

2018-03-12 Thread Edward K. Ream
This top-level menu has two items: Apply Theme and Open Theme File.

Both commands prompt for a theme file, starting in leo\themes, then open 
the file which automatically applies the theme.

The Open Theme File command leaves the theme file open.  The Apply Theme 
file command closes the theme file.

I'm not sure these two commands are worth a separate top-level menu.  It's 
probably more logical to put these commands in the Settings menu.  What do 
you think?

There is more work to be done regarding themes. See #766 
<https://github.com/leo-editor/leo-editor/issues/766>.

1.  Allow themes that affect only settings.
2.  Allow themes that *add* to stylesheets.  For example, a big-text theme.
3.  Support @string initial-theme =  and/or @data 
initial-themes. See #790 
<https://github.com/leo-editor/leo-editor/issues/790>.
4. Migrate more themes into leo/themes.  This will likely take the most 
work.

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


Re: Themes

2018-03-11 Thread Edward K. Ream
On Sun, Mar 11, 2018 at 6:06 PM, k-hen  wrote:

​[I] ...​
> was just curious whether you envisioned people editing the regular
> constants/defaults, like 'red' and/or 'leoRed' or whether these were best
> kept separate.
>

​Devs should not change the color definitions in leoSettings.leo:

leoSettings.leo#@settings--> Color definitions​

Other than that, using more meaning full names, and "multi-level" names,
seems like a great idea.

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


Re: Themes

2018-03-11 Thread k-hen
Edit: I guess what I'm saying here is that I prefer a 3-step approach, 1st 
the definition of the full color-palette, 2nd the assignment of the 
color-palette to the logical structural & syntax elements, 3rd the 
assignment of those logical elements to the physical components in the 
stylesheet, i.e. the @data component.

Obviously I can contain these to my own model, but was just curious whether 
you envisioned people editing the regular constants/defaults, like 'red' 
and/or 'leoRed' or whether these were best kept separate. 

Kevin


On Sunday, March 11, 2018 at 6:56:08 PM UTC-4, Edward K. Ream wrote:
>
>
>
> On Sun, Mar 11, 2018 at 5:47 PM, k-hen  > wrote:
>
>>
>> Just wanted to say thanks very much for this.  It happens I was looking 
>> at creating my own theme as a way of learning more about Leo and was really 
>> struggling with the stylesheets myself. FWIW, the way I was going about 
>> this was first defining my full color palette in a section within 
>> myLeoSettings as my-magenta, my-red, my-orange, etc., then applying those 
>> colors to the various objects in the stylesheet. This makes it a bit easier 
>> to swap them in and out of the @settings section depending on the context 
>> I'm in without having to reassign the major styles. Another thing I often 
>> do is set magenta+1, magenta-1 for more/less emphasis that can be reversed 
>> for light/dark themes. I'll post a bit more once I get it updated for the 
>> newer standard.
>>
>
> ​Thanks for these comments. They are all good ideas.
>
> 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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Themes

2018-03-11 Thread Edward K. Ream
On Sun, Mar 11, 2018 at 5:47 PM, k-hen  wrote:

>
> Just wanted to say thanks very much for this.  It happens I was looking at
> creating my own theme as a way of learning more about Leo and was really
> struggling with the stylesheets myself. FWIW, the way I was going about
> this was first defining my full color palette in a section within
> myLeoSettings as my-magenta, my-red, my-orange, etc., then applying those
> colors to the various objects in the stylesheet. This makes it a bit easier
> to swap them in and out of the @settings section depending on the context
> I'm in without having to reassign the major styles. Another thing I often
> do is set magenta+1, magenta-1 for more/less emphasis that can be reversed
> for light/dark themes. I'll post a bit more once I get it updated for the
> newer standard.
>

​Thanks for these comments. They are all good ideas.

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


Re: Themes

2018-03-11 Thread k-hen
Hi Guys,
Just wanted to say thanks very much for this.  It happens I was looking at 
creating my own theme as a way of learning more about Leo and was really 
struggling with the stylesheets myself. FWIW, the way I was going about 
this was first defining my full color palette in a section within 
myLeoSettings as my-magenta, my-red, my-orange, etc., then applying those 
colors to the various objects in the stylesheet. This makes it a bit easier 
to swap them in and out of the @settings section depending on the context 
I'm in without having to reassign the major styles. Another thing I often 
do is set magenta+1, magenta-1 for more/less emphasis that can be reversed 
for light/dark themes. I'll post a bit more once I get it updated for the 
newer standard.

Kevin


On Saturday, March 10, 2018 at 5:57:54 AM UTC-5, Edward K. Ream wrote:
>
> On Sat, Mar 10, 2018 at 4:46 AM, Edward K. Ream  > wrote:
>  
>
>> is there a different mechanism
>>> ​ [to generalize the] ​
>>> path relative to leo/themes/?
>>>
>>
> ​This is tricky.  We probably need a new setting for 
> ssm.set_indicator_paths.
>
> Something like @string theme_base_directory, which would *itself* be a 
> path relative to leo/themes (first) and leo/Icons (second).
>
> If this setting exists, it would be used *in addition to* the 
> tree-image-closed and tree-image-closed settings.
>
> This is on my local list of things to do today.
>
> 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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Themes menu: status report 2

2018-03-10 Thread Edward K. Ream
On Saturday, March 10, 2018 at 5:45:19 AM UTC-6, Edward K. Ream wrote:

> I'll experiment with support for @data additional-style-sheet.
> The body would be a style sheet that...would be tacked on to whatever 
stylesheet is *already* in effect.

Hmm.  Qt stylesheets do not cascade properly, and maybe not at all. 
Appending css for QWidget changes more specific css that has already been 
defined.  It's a bug, but it can never be changed and we must work around 
it.

So perhaps there should be two new style sheets:

@data prepend-style-sheet
@data append-style-sheet

Using @data prepend-style-sheet would typically be safer, but Chris George 
points out that @data append-style-sheet does have its uses.

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


Themes menu: status report 2

2018-03-10 Thread Edward K. Ream
Excellent progress yesterday.  Significant work remains.

*Yesterday's work*

1. These two @button nodes now work properly, seemingly in all respects 
(but see below).

@button open-light-theme
c.styleSheetManager.load_theme_file('EKRLight.leo')

@button open-dark-theme
c.styleSheetManager.load_theme_file('LeoBlackSolarized.leo')

All complications are confined to the StyleSheetManager class in qt_gui.py.

2. Chris George and I are collaborating to make it easier to generalize 
both themes and style sheets.  Chris has been dumping icons into 
leo/Icons.  That's fine, but the goal will to move the *new* folders into 
leo/themes.

Perhaps I should have created a themes git branch, but now that would just 
make it more difficult to deal with the new folders.

3. ssm.expand_css_constants now *always* warns (in the console) if a 
stylesheet contains unresolved @ constants.  This was a crucial missing 
tool for devs.  How did stylesheet devs ever live without these warnings?

Style sheets should not have unresolved constants! They create the 
potential for settings defined in leoSettings.leo or myLeoSettings to 
"bleed into" the stylesheet.  The result will be massive confusion for 
stylesheet devs.

The two theme .leo files in leo/themes now contain no unresolved 
@constants.  For the first time, they are fit as models for further testing.

*Further work*

A. The two @button nodes do work, but Ctrl-N, opening a new .leo file gives 
quite a surprise.  The theme reverts to the user's theme in all panes!

Imo, loading a theme must do the following:

1. Remember the loaded theme in a global *list* of all previously-loaded 
themes.
2. Suppress loading myLeoSettings.leo and leoSettings.leo when opening a 
new file.
3. Apply the previously loaded themes (in order) when opening a  new file.

B. We want later themes to be able to *add to* previous themes.  This might 
already "just work" in a limited way: The present code allows themes 
without style sheets.  Such themes alter only global settings, such as 
syntax coloring settings or other text colors.

I'll experiment with support for @data additional-style-sheet.  The body 
would be a style sheet that, as its name implies, would be tacked on to 
whatever stylesheet is *already* in effect.  This would be valid only if 
the theme defines neither @data qt-gui-plugin-stylesheet nor 
qt-gui-user-stylesheet.  Understand?

C. Point A hints at replacing @theme trees in myLeoSettings.leo with a new 
setting, say:

@string use_theme = 

Don't panic. This setting will be completely optional.  We *must* continue 
to support whatever users have in myLeoSettings.leo.

*Summary*

Loading a theme should suppress further use of *all* settings in 
leoSettings.leo and myLeoSettings.leo. Or so I think now.

Goals:

- Allow themes to partially override previously loaded themes using @data 
additional-style-sheet. 
- Allow themes without stylesheets. These would override colors.
- Apply all previously loaded themes in order when opening a new file.
- Support the *optional* setting @string use_theme, while supporting all 
legacy myLeoSettings.leo files.

Chris George is providing valuable feedback during this process.

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


Re: Themes

2018-03-10 Thread Edward K. Ream
On Sat, Mar 10, 2018 at 4:46 AM, Edward K. Ream  wrote:


> is there a different mechanism
>> ​ [to generalize the] ​
>> path relative to leo/themes/?
>>
>
​This is tricky.  We probably need a new setting for
ssm.set_indicator_paths.

Something like @string theme_base_directory, which would *itself* be a path
relative to leo/themes (first) and leo/Icons (second).

If this setting exists, it would be used *in addition to* the
tree-image-closed and tree-image-closed settings.

This is on my local list of things to do today.

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


Re: Themes

2018-03-10 Thread Edward K. Ream
On Fri, Mar 9, 2018 at 11:53 AM, Chris George  wrote:


> The second image is direct.png. It shows the total loss of triangles in
> the tree. Here is the css.
>
> TreeView::branch:closed:has-children{
>
> image: url(:dark/branch_closed.svg);
>
> }
> The css passes the checks, the images simply do not display.
>
​...​
>
> Looking at the full stylesheet, the color_theme machinery returns the
> following for the abstract.png css.
>
>
> QTreeView::branch:closed:has-children{
>
> image: url(/home/chris/leo-editor/leo/Icons/dark/branch_closed.svg);
>
> }
>
> The script replaces dark/branch_open.svg with the full path to the image.
>

​Right.  I was dealing with this topic last night. ssm.set_indicator_paths
makes this substitution.

It seems that direct coding of the stylesheet won't work for any other
> images than the two; open and closed.
>

​I think you are right.  Of course, you put a full path into your css, but
that's ugly and not transportable across machines.
​


> For ease of use (themers and users) is there a different mechanism we
> could use for replacing the path to leo when appending to the provided path
> relative to leo/themes/? For example: the default Qt styling
> uses the format
>
> url(://);
>
>
> Note the leading "/".
>
>
> If we could support this syntax, it would make modifying existing Qt
> themes much, much simpler.
>

​Let me think about this.

 As for the boxes, I still have white boxes in the tree.
>

​I wrestled with this myself last night.  The Qt qui code uses the
​
@string color_theme = dark to find the icons.  The actual code is
qt_gui.getImageImageFinder.  I added a trace last night.  You can enable
that trace to see exactly what is happening.

Surely, qt_gui.getImageImageFinder should be improved so that it looks in
more places, including leo/themes//boxes.  It should probably
look first in these places:

~/.leo/themes
or maybe:
~/leo/themes

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


Re: Themes

2018-03-09 Thread Chris George
A recent commit fixed the box problem. But I am still struggling with how 
to source images other than "open" and "close".

It looks great with the correct boxes.

Chris

On Friday, March 9, 2018 at 9:53:31 AM UTC-8, Chris George wrote:
>
>
>
>
>
>
> Where do I get to choose the boxes?
>>>
>>
>> ​There are two settings: For the Leo Dark theme they are:
>>
>> @string tree-image-closed = nodes-dark/triangles/closed.png
>> @string tree-image-open = nodes-dark/triangles/open.png
>>
>
>> I think these paths are relative to the leo/Icons folder.  *But let's 
>> not guess*.
>>
>> Searching for tree-image-closed finds ssm.set_indicator_paths & helper.  
>> Here is the docstring:
>>
>> '''
>> In the stylesheet, replace (if they exist)::
>>
>> image: @tree-image-closed
>> image: @tree-image-open
>>
>> by::
>>
>> url(path/closed.png)
>> url(path/open.png)
>>
>> path can be relative to ~ or to leo/Icons.
>>
>> Assuming that ~/myIcons/closed.png exists, either of these will work::
>>
>> @string tree-image-closed = nodes-dark/triangles/closed.png
>> @string tree-image-closed = myIcons/closed.png
>>
>> Return the updated stylesheet.
>> '''
>>
>
> I have verified that this works fine if the folder is in my home directory 
> (not a great place for theme images IMHO) or in leo/Icons (also not a great 
> place for theme images IMHO) Putting them in then in 
> *.../leo/themes//Icons 
> *doesn't work and this is the only place where theme images should live 
> IMHO. Having more than one place to look is extremely valuable for 
> settings. But it can lead to madness for people looking to create or modify 
> themes.
>
> I have attached two screenshots to clarify. abstract.png is an example of 
> correct behavior. nb. All theme images should be svg. Raster formats look 
> like crap when you resize them. 
>
> @string tree-image-closed = dark/branch_closed.svg
> @string tree-image-closed = dark/branch_open.svg
>
> These settings are read, inserted and applied. The triangle images are 
> correctly displayed. Here is the css that works with it.
>
>
>
> QTreeView::branch:closed:has-children{
>
> image: @tree-image-closed;
>
> }
>
> QTreeView::branch:open:has-children{
>
> image: @tree-image-open;
>
> }
>
>  The second image is direct.png. It shows the total loss of triangles in 
> the tree. Here is the css.
>
> TreeView::branch:closed:has-children{
>
> 
> image: url(:dark/branch_closed.svg);
>
> }
>
> QTreeView::branch:open:has-children{
>
> image: url(:dark/branch_open.svg);
>
> }
>
> The css passes the checks, the images simply do not display.
>
>
> Looking at the full stylesheet, the color_theme machinery returns the 
> following for the abstract.png css.
>
>
>
>
> QTreeView::branch:closed:has-children{
>
> image: url(/home/chris/leo-editor/leo/Icons/dark/branch_closed.svg);
>
> }
>
> QTreeView::branch:open:has-children{
>
> image: url(/home/chris/leo-editor/leo/Icons/dark/branch_open.svg);
>
> }
>
> The script replaces dark/branch_open.svg with the full path to the image. 
> It seems that direct coding of the stylesheet won't work for any other 
> images than the two; open and closed. I tried creating a new definition in 
> the same node as the @string statements, but it didn't work. Creating the 
> smae abstraction for every single new image we want to use in the 
> stylesheet would be tedious. 
>
>
> For ease of use (themers and users) is there a different mechanism we 
> could use for replacing the path to leo when appending to the provided path 
> relative to leo/themes/? For example: the default Qt styling 
> uses the format
>
> url(://);
>
>
> Note the leading "/". 
>
>
> If we could support this syntax, it would make modifying existing Qt 
> themes much, much simpler. 
>
>
>
> These two settings might also be involved:
>>
>> @bool color_theme_is_dark = True
>> @string color_theme = leo_dark_0
>>
>> Again, *let's not guess*.
>>
>> *@bool color_theme_is_dark*: I found nothing for a regex search for 
>> color.theme.is.dark.
>>
>> I was about to disable it, but its body text contains:
>>
>> Set to true for dark themes, so bookmarks.py can generate
>> random background colors which are appropriate etc.
>>
>>  
> As for the boxes

Re: Themes menu: status report

2018-03-09 Thread Edward K. Ream
On Friday, March 9, 2018 at 5:33:48 AM UTC-6, Edward K. Ream wrote:

*Changing settings*
>
> This is unexpectedly tricky.  After computing the local settings, we want 
> to use *all and only* those settings when computing the stylesheets.  How 
> to do this?  
>

Oh joy. It appears that we can just pass the local settings dict to  
expand_css_constants.  No need to mess with temporary global settings.

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


Themes menu: status report

2018-03-09 Thread Edward K. Ream
Yesterday I prototyped the Themes menu.  With the latest code from the 
devel branch you can see the results with these two @button nodes:

@button open-light-theme
c.styleSheetManager.load_theme_file('EKRLight.leo')

@button open-dark-theme
c.styleSheetManager.load_theme_file('LeoBlackSolarized.leo')

You can switch back and forth between them as many times as you like. So it 
looks likes everything "just" works, but appearances are quite wrong.

The rest of this post is an ENB (Engineering Notebook) post.  Feel free to 
ignore, but it is pre-writing for new docs. It also discusses planned 
improvements in tooling for themes. See the summary.

*Status*

ssm.load_theme_files reads the theme file correctly using a null gui.  It 
then computes a *local* settings dict that contains the two stylesheets.  
It extracts the stylesheets and applies them. This *mostly* handles 
stylesheets correctly.  However, *settings that affect stylesheets are not 
updated correctly at present*.

*Which settings?*

The present code updates the (local) settings using the *entire* @settings 
tree in the theme file.  This is wrong. Some settings apply to the theme 
*file*, rather than the theme. These settings lie *outside* the @theme 
tree. Examples:

@bool minibuffer_find_mode = False # Ensures that the Find Tab is visible.
@bool show-tips = False # Suppresses tips when opening the file.

Loading a theme should not change these settings!  So the local settings 
should include only settings included in the @theme tree.

*Changing settings*

This is unexpectedly tricky.  After computing the local settings, we want 
to use *all and only* those settings when computing the stylesheets.  How 
to do this?  We don't want to pollute the code with this consideration.  
That is, we want the code to continue to use c.config.get* as before.

The simplest thing that could possibly work may be to use *temporary global 
settings*. Something like this:

c.config.save_settings() # Saves previous global settings.
c.config.init_setting(local_settings) # Make the local settings global.
<>
c.config.restore_settings() # Restores the previous global settings.

Finally, we *do* want to update the *old* global settings with the new *local 
*settings, so they have effect everywhere.  These settings affect syntax 
coloring, etc., not just the stylesheets themselves.

But we must update the global settings only *after* computing the style 
sheets, so that we are *sure* that the computed stylesheets depend *only* 
on settings in the @theme tree of the loaded theme and on *nothing* else. 
This detail is worth *any* amount of work because it helps us 
long-suffering theme devs.  Loading a theme file by itself should show devs 
*exactly 
the same thing* as loading the theme from the Theme menu.  The only way to 
ensure that is to be very careful about updating settings.

*Checking style sheets*

Qt whiffs when it comes to checking style sheets. I plan to add syntax 
checking logic for computed style sheets.  The code will warn about:

- Bad nesting of curly braces and comments.
- @constants within comments and unresolved @constants when all is 
completed.

These are all signs of trouble. It might be good to run these checks during 
every iteration of @constant expansion.

*Summary*

Updating settings is surprisingly tricky.  Doing so properly will show devs 
*exactly 
*what will happen when their themes are applied. These details are worth 
any amount of work.

The code that creates and expands style sheets will soon do sanity checks 
on the results. The @constant expansion algorithm will remain unchanged.

It may take a day or three to complete this work.  Such work will pay off 
handsomely.

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


Re: Themes

2018-03-09 Thread Edward K. Ream
On Thu, Mar 8, 2018 at 11:18 AM, Chris George  wrote:

> Where do I get to choose the boxes?
>

​There are two settings: For the Leo Dark setting they are:

@string tree-image-closed = nodes-dark/triangles/closed.png
@string tree-image-open = nodes-dark/triangles/open.png

I think these paths are relative to the leo/Icons folder.  *But let's not
guess*.

Searching for tree-image-closed finds ssm.set_indicator_paths & helper.
Here is the docstring:

'''
In the stylesheet, replace (if they exist)::

image: @tree-image-closed
image: @tree-image-open

by::

url(path/closed.png)
url(path/open.png)

path can be relative to ~ or to leo/Icons.

Assuming that ~/myIcons/closed.png exists, either of these will work::

@string tree-image-closed = nodes-dark/triangles/closed.png
@string tree-image-closed = myIcons/closed.png

Return the updated stylesheet.
'''
These two settings might also be involved:

@bool color_theme_is_dark = True
@string color_theme = leo_dark_0

Again, *let's not guess*.

*@bool color_theme_is_dark*: I found nothing for a regex search for
color.theme.is.dark.

I was about to disable it, but its body text contains:

Set to true for dark themes, so bookmarks.py can generate
random background colors which are appropriate etc.

*@string color_theme*: A cff on the regex color.theme yields 5 matches,
including qt_gui.getImageImage. The docstring is:

'''Load the image in file named `name` and return it.

If self.color_theme, set from @settings -> @string color_theme is set,

     - look first in $HOME/.leo/themes//Icons,
 - then in .../leo/themes//Icons,
 - then in .../leo/Icons,
 - as well as trying absolute path
 '''
It's helper also has the same docstring ;-)

*Summary*: The truth is out there if we look.

HTH.

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


Re: Themes

2018-03-08 Thread Chris George
Where do I get to choose the boxes?

SInce this morning (Rev 5e3976b) I get the white box images in the tree 
with both Breeze Dark Theme - KDE Plasma.leo with myLeoSettings.leo 
disabled and with settings enabled and the theme in myLeoSettings.leo.

I deleted both sets of white boxes in leo/Icons to no avail. The boxes are 
still white.

I changed from leo_dark_0 to dark and back again. No effect.

There is only one reference to the box set in leoSettings.leo. It is in the 
settings for mod_http plugin and it is a stylesheet.

It also pulls the images directly from the root of leoeditor.com!! I 
disabled my network. I deleted the mod_http plugin node and the white boxes 
still persist.

At this point I would love to let sleeping dogs lie and just load the dark 
boxes.

Where would I do that?

Chris


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


Re: Themes

2018-03-08 Thread Edward K. Ream
On Thursday, March 8, 2018 at 4:49:42 AM UTC-6, Edward K. Ream wrote:
>
>
> I see by your rev 0924e4f that you have joined the dev team.  Thanks!
>

Rev 5e3976b adds the @color log_note_color setting.  Be sure to pull this 
before making any more changes.

I'm hoping this is the last "jiggle" in theme settings, but that's not 
guaranteed.

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


Re: Themes

2018-03-08 Thread Edward K. Ream
On Wednesday, March 7, 2018 at 5:08:24 PM UTC-6, Edward K. Ream wrote:

Instead of sending an attachment, please push your work.
>

I see by your rev 0924e4f that you have joined the dev team.  Thanks!

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


Re: Themes

2018-03-07 Thread Edward K. Ream
On Wed, Mar 7, 2018 at 4:06 PM, Chris George  wrote:

> Changed by CG
>
> - Finished button styling.
> - Replaced all hacks by moving "Widgets: general" node to top of
> stylesheet and styling appropriate widgets.
> - Added hover effect to menus to match buttons and tabs.
>

​Instead of sending an attachment, please push your work.  This makes
collaboration much easier.

I have just invited you to be a member of the core Leo team.  Let me know
if there are problems.

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


Re: Themes

2018-03-07 Thread Chris George
Changed by CG

- Finished button styling.
- Replaced all hacks by moving "Widgets: general" node to top of stylesheet 
and styling appropriate widgets.
- Added hover effect to menus to match buttons and tabs.


Still researching how to fix the glitchy "contextmenu".

Chris

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


Breeze Dark Theme - KDE Plasma.leo
Description: Binary data


Re: Themes

2018-03-07 Thread Chris George
Mainly I thought it might be handy to have a reference available to show 
the relationships in the hierarchy in order for themers to make sure they 
get the inheritance right.

For example the relationships between LeoQtx and Qtx aren't clear 
to me at all.

Chris

On Wednesday, March 7, 2018 at 10:39:24 AM UTC-8, Edward K. Ream wrote:
>
>
>
> On Wed, Mar 7, 2018 at 11:48 AM, Chris George  > wrote:
>
> How hard would it be to generate a tree showing Qt widget inheritance from 
>> Leo's source?
>>
>
> ​Not sure what you mean.  w.parent() is the containing widget.  
> w.__class__ is the widget's class, which can be inspected with Python's 
> inspect module.
>
> 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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Themes

2018-03-07 Thread Edward K. Ream
On Wed, Mar 7, 2018 at 11:48 AM, Chris George  wrote:

How hard would it be to generate a tree showing Qt widget inheritance from
> Leo's source?
>

​Not sure what you mean.  w.parent() is the containing widget.  w.__class__
is the widget's class, which can be inspected with Python's inspect module.

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


Re: Themes

2018-03-07 Thread Chris George


How hard would it be to generate a tree showing Qt widget inheritance from 
Leo's source?

Chris

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


  1   2   >