Here's my go at a `quadrants` layout:
```
from leo.core.leoQt import Orientation, QtWidgets
import leo.plugins.viewrendered as vr
gui = g.app.gui
def make_splitter():
w = QtWidgets.QSplitter()
w.setObjectName('body_splitter')
return w
ms = gui.find_widget_by_name(c, 'main_splitter')
ss = gui.find_widget_by_name(c, 'secondary_splitter')
edf = gui.find_widget_by_name(c, 'bodyFrame')
# add vertical splitter to ms (hosting only the editor)
body_splitter = make_splitter()
body_splitter.setOrientation(Orientation.Vertical)
ms.addWidget(body_splitter)
body_splitter.addWidget(edf)
# add vr pane
h = c.hash()
vrp = vr.controllers.get(h)
if not vrp:
vr.controllers[h] = vrp = vr.ViewRenderedController(c)
if not vrp.isVisible():
body_splitter.addWidget(vrp)
body_splitter.setSizes([100_000] * len(body_splitter.sizes()))
ms.setSizes([100_000] * len(ms.sizes()))
ss.setSizes([100_000] * len(ss.sizes()))
c.doCommandByName('vr-show')
```
I wasn't sure exactly which invocations of setSizes I needed, so I just did
all of them to perfectly balance everything. Thanks for the boilerplate of
the script, Thomas -- supremely useful in combination with Edward's info
item #3982.
Jake
On Thu, Jul 18, 2024 at 9:45 PM Thomas Passin <[email protected]> wrote:
>
> On Thursday, July 18, 2024 at 9:11:29 PM UTC-4 Edward K. Ream wrote:
>
> On Thu, Jul 18, 2024 at 4:27 PM Thomas Passin <[email protected]> wrote:
>
> And here's a script to create Jacob's Layout #3 "render-focused". This
> script will work for either VR or VR3 if you just change the module
> imported at the top.
>
>
> Thanks for this. The script works for me with VR3 but not VR. I'll post a
> revised script asap.
>
>
> It worked for both for me. If the pane on the right shows up but VR isn't
> showing anything, try running the "vr-show'" command. I went to the toggle
> command when vr-show didn't work, but maybe you had VR visible already and
> the toggle turned it off.
>
> The intended import change is from
>
> import leo.plugins.viewrendered3 as v3
>
> to
>
> import leo.plugins.viewrendered as v3
>
> The naming as "v3" and "vr3" when the desired widget is VR is a bit of
> cognitive dissonance. It was simpler that way for a quick proof of
> principle.
>
> --
> 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/a40175bf-e694-4491-bf07-34dcebf549a0n%40googlegroups.com
> <https://groups.google.com/d/msgid/leo-editor/a40175bf-e694-4491-bf07-34dcebf549a0n%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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/leo-editor/CAJ1i%2BSb7vq%3DxVbbkpPmhXfU-887Ap_um5z_cQrk4w5eryD9u4w%40mail.gmail.com.