Re: sqlite-leo and collecting settings

2017-07-08 Thread Terry Brown
On Sat, 8 Jul 2017 08:46:07 -0500
"Edward K. Ream"  wrote:

> On Sat, Jul 8, 2017 at 4:53 AM, vitalije  wrote:
> 
> 
> > It seems that at-font settings kind is replaced with other methods
> > of configuration.
> >
> 
> ​This is complicated.  Iirc, the complications stem, in part, from the
> theme machinery.  @data qt-gui-plugin-style-sheet forms a "base"
> style, which the user can "override" with @data
> qt-gui-user-style-sheet.

I don't think there's much complication there, qt-gui-user-style-sheet
is just appended to qt-gui-plugin-style-sheet.

> There is a substitution mechanism, somewhere, that replaces @
> constants in these stylesheets with the proper values. I can provide
> more details if you like, but I would have to do the same searches
> that you would ;-)

I think the dereferencing system is not to messy, but there is some
complication where the Ctrl-mousewheel font zooming hooks in.  It's
actually a generic system for dynamically updating stylesheet elements,
I'd have to look at the code to remember more details, but please test
that Ctrl-mousewheel font zooming doesn't get broken as that's an
important accessibility feature I feel.

Cheers -Terry

> This is yet another case where trying to simplify the user's
> experience creates lots of complications behind the scenes.
> 
> There used to be an issues called something like @color settings don't
> dereference, but I don't seem to be able to find it.
> 
> 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: sqlite-leo and collecting settings

2017-07-08 Thread Terry Brown
On Sat, 8 Jul 2017 00:57:14 -0700 (PDT)
vitalije  wrote:

> I am confident that I can write command to open relevant 
> settings file, make change there and save it again

Note that the Settings -> Edit Settings menu item machinery does some
of this.  Well, really it's just copying settings from one file to
another, but if you're heading down the track of making an API for
setting settings, those functions might be informative or might benefit
from whatever you come up with as an alternative implementation.

That code will also create myLeoSettings.leo if needed, which might be
relevant to your work.

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: sqlite-leo and collecting settings

2017-07-08 Thread Edward K. Ream
On Sat, Jul 8, 2017 at 4:02 AM, vitalije  wrote:

> When user edits at-font settings node, clicking OK should adjust body of
>> node to selected font.
>>
>
> Done at  30c6dae.
> Warning: previously command show-fonts expected that font family is in
> clipboard and it copied selected font family in clipboard after dialog
> confirmation. Now this command doesn't use clipboard but it adjusts body
> changing accordingly not only family but also weight, slant and size  of a
> font.
>

​Excellent.  I've made a note to myself to document this.v

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: sqlite-leo and collecting settings

2017-07-08 Thread Edward K. Ream
On Sat, Jul 8, 2017 at 4:53 AM, vitalije  wrote:


> It seems that at-font settings kind is replaced with other methods of
> configuration.
>

​This is complicated.  Iirc, the complications stem, in part, from the
theme machinery.  @data qt-gui-plugin-style-sheet forms a "base" style,
which the user can "override" with @data qt-gui-user-style-sheet.

There is a substitution mechanism, somewhere, that replaces @ constants in
these stylesheets with the proper values. I can provide more details if you
like, but I would have to do the same searches that you would ;-)

This is yet another case where trying to simplify the user's experience
creates lots of complications behind the scenes.

There used to be an issues called something like @color settings don't
dereference, but I don't seem to be able to find it.

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: sqlite-leo and collecting settings

2017-07-08 Thread vitalije
While trying to test new show-fonts capabilities, I have noticed that in 
leoSettings.leo there are just a few at-font settings. However, when 
searching for at-font in Nav panel, it finds tons of settings of the 
following form:

@string  @font-...

It seems that at-font settings kind is replaced with other methods of 
configuration. In the chapter about customizing Leo, there is just one 
paragraph about at-font type of setting and in given example several values 
are set to None. One can't figure by reading that paragraph what can be set 
in _weight, _slant values. Size is maybe obvious but can it be set to 
float? Is it point size or pixel size? 

Is this feature deprecated in favor of something else?

-- 
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: sqlite-leo and collecting settings

2017-07-08 Thread vitalije

>
> When user edits at-font settings node, clicking OK should adjust body of 
> node to selected font. 
>

Done at  30c6dae.
Warning: previously command show-fonts expected that font family is in 
clipboard and it copied selected font family in clipboard after dialog 
confirmation. Now this command doesn't use clipboard but it adjusts body 
changing accordingly not only family but also weight, slant and size  of a 
font.

When invoked outside of at-font node it doesn't do anything special with 
selected font.
Vitalije

-- 
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.