Freewin windows display with either a light or dark theme, depending on
whether your Leo theme is marked as light or dark. The colors are not
picked up from the theme, but at least the light/dark character is
maintained.
For the editing view, by default built-in stylesheets are used. For the
Restructured Text view, the default stylesheet used by Docutils is
applied. Unfortunately the same RsT stylesheet will be used for both light
and dark themes, since Docutils has only one default stylesheet.
You can use your own stylesheets. They must have specific names, and be
located in your user's .leo/css directory. I recommend that you copy the
RsT stylesheets from Leo's leo/plugins/viewrendered3 directory, renaming
them as you do so. The plugin's Readme info has the details. You can read
them by invoking the Leo menu item Plugins/freewin/about. In summary:
Freewin Css Stylesheet Names
--------------------------------------------------
Editor
-----------
Light Dark
freewin_editor_light.css freewin_editor_dark.css
RsT Rendering
------------------------
freewin_rst_light.css freewin_rst_dark.css
The VR3 RsT stylesheet displays a little on the large side, but I will soon
be submitting a VR3 pull request that will reduce the size.
Freewin works with PyQt5, or PyQt6 if that is installed. Unfortunately with
PyQt6 the RsT dark theme renders as if there is no stylesheet. This
appearance is not the best, and it is not dark-themed. This should be
fixed when the Qt6 WebEngineView component is released, if not before.
My next post will cover the rationale for the plugin design, how I expected
to use it, and and some other uses I have already found to be convenient.
On Wednesday, June 16, 2021 at 5:21:43 PM UTC-4 [email protected] wrote:
> My new Freewin plugin has just been merged into the devel branch. This
> plugin will open a smaller-than-Leo window that is dedicated to showing the
> node that was selected when the Freewin window was opened.
>
> This window is provides a plain editing view, and can be switched to
> provide a view of the node's body rendered as Restructured Text. The
> window is synchronized with its host node - editing changes in the window
> get reflected in the host node, and changes to the host node appear in the
> Freewin window. The editor has all the basic editing functions, but no
> Leo-specific enhancements nor syntax coloring.
>
> You can have any number of windows open at the same time, each linked to a
> different node.
>
> You enable the plugin like any other, by adding its name to the *enabled
> plugins* node in your *MyLeoSettings.leo *file.
>
> There is one command, to open a window, and no settings. The open command
> is called *z-open-freewin.* I like to have it linked to a button, which
> you can do by adding an @setting to the @settings tree in either a specific
> outline or in myLeoSettings.leo. The setting is like this:
>
> Headline: @button Freewin
> Body: c.executeMinibufferCommand('z-open-freewin')
>
> In my next post, I will explain how to customize Freewin's appearance and
> get the most out of theme switching.
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/leo-editor/e1c58625-ede8-457d-b9b7-ef83c5abdda0n%40googlegroups.com.