UI config. settings, step 1.

38 views
Skip to first unread message

Terry Brown

unread,
Aug 14, 2014, 4:16:32 PM8/14/14
to leo-editor
Short version:

Dufriz, if you want, grab the latest version, open your
myLeoSettings.leo, and use the new Reload Styles item from the Settings
menu. It will hopefully either work, or give sensible feedback.

Long version:

Interesting pit fall with including code in Leo outlines like the
`stylesheet & source` node the instructions wanted you to execute, or
the `@button reload-styles` which was supposed to be included in
all settings type files. In either case, Leo specific code which the
user isn't supposed to need to touch is being copied around, creating
duplicate versions, without easy updates... big anti-pattern.

The correct way is for style reloading to be handled by a Leo command
defined in Leo's core (well, the Qt interface core, anyway) so it can
be changed and updated as needed.

So the instructions to execute `stylesheet & source` and the `@button
reload-styles` are still out there, with their broken calls to
g.expand_css_constants etc., they'll have to be rounded up somehow.
Anyway, *now* the way to recompile the tree form of a theme into a
style-sheet (if your using a theme) and apply the style-sheet (from a
theme or simple static) is to Alt-X style-reload, or just
Settings->Reload Styles.

Cheers -Terry

Dufriz

unread,
Aug 14, 2014, 8:45:56 PM8/14/14
to leo-e...@googlegroups.com
Terry, I have just started testing your latest commit. I ran the Reload Styles command in the menu without problems, and the UI appearance changed a bit, signifying that some of the modified settings have taken effect. Still I can't say much about the new functionality, I need time to tinker with the settings and run it again, probably over the weekend.
However one (minor) thing that I have already noticed is that the menu entries are no longer highlighted when the mouse hovers over them. This is a problem which had already occurred a few months ago, and which you then fixed.
I'll let you know when I have experimented a little more.
Thanks for your help.

Dufriz

unread,
Aug 15, 2014, 6:08:46 AM8/15/14
to leo-e...@googlegroups.com
Terry, the stylesheet now compiles without problems, but many of the settings are still ignored.

I have noticed that now all the minibuffer color definitions (label, status, selection fg and bg) are ignored, whereas iirc before the last commit the minibuffer's background-color was the only setting that was ignored.
So, clearly there is still a problem with the stylesheet, despite the absence of error messages.

Terry Brown

unread,
Aug 15, 2014, 10:29:54 AM8/15/14
to leo-e...@googlegroups.com
On Fri, 15 Aug 2014 03:08:46 -0700 (PDT)
Dufriz <duf...@gmail.com> wrote:

> Terry, the stylesheet now compiles without problems, but many of the
> settings are still ignored.
>
> I have noticed that now *all* the minibuffer color definitions
> (label, status, selection fg and bg) are ignored, whereas iirc before
> the last commit the minibuffer's background-color was the only
> setting that was ignored.
> So, clearly there is still a problem with the stylesheet, despite
> the absence of error messages.

When I change
/home/tbrown/.leo/myLeoSettings.leo#@settings-->leo_dark theme 0-->Settings for theme-->colors-->@color minibuffer_background_color = @solarized-base03

e.g. "@solarized-base03" -> "pink"

Reload Styles works as expected. Is that what you were changing?

Cheers -Terry

dufriz

unread,
Aug 15, 2014, 1:35:20 PM8/15/14
to leo-e...@googlegroups.com
No, I was changing background-color under the node "mini-buffer & status" (which is child of stylesheet & source). I did not even know of the existence of the settings you just mentioned, under that node. Yet another node which contains color settings!!

Anyhow, now it works. Problem solved.

Moreover, with the latest recompile several unexpected changes in the UI appearance have taken place, all at once, because I had not modified the relevant parameters. For instance, the appearance of the scroll bars has changed. Likewise, the size of the text in panes has changed. And the menu entries too are now properly highlighted when the mouse pointer hovers over them, once again!

My guess is that these sudden changes are due to some of the parameters which I had set earlier, and which for some reason had not taken effect until now.

Thanks again, Terry, for your invaluable support.

Reply all
Reply to author
Forward
0 new messages