On Wed, 10 May 2017 08:47:00 -0700 (PDT)
john lunzer <[email protected]> wrote:

> As an extension to "arrange the panes how you want and save the
> layout", there could be multiple saved (and custom named) layouts and
> Leo could ship with "vertical" and "horizontal" default layouts and
> the binding to "toggle-split-direction" could be replaced with a
> binding to "cycle-layouts". Then the user could either
> modify/overwrite the stock layouts or scrap those and just create
> their own layouts. I think this would maintain simplicity and also
> offer a powerful system for quickly changing layouts.

This is a good idea although it does run into one wrinkle.

free_layout already supports multiple named layouts, and cycling
through them would be convenient.  However, switching layouts causes
Leo to instantiate (create) the widgets needed to fill the panes in a
particular layout.  Sometimes that might be slow / undesirable.  So
perhaps when a layout is saved, we'd need a checkbox "include in cycle
layouts".

Clarifying - switching vertical / horizontal / wide body / narrow tree
etc. is fast and no problem, but a layout might include other panes
(todo interface, graph editor, movie viewer) that are klunky to throw
up just because you're trying to cycle from horizontal to vertical.

Cheers -Terry

> Just a thought for creating a simple/unified layout interface.
> 
> On Tuesday, May 9, 2017 at 3:37:22 PM UTC-4, Edward K. Ream wrote:
> >
> > On Tue, May 9, 2017 at 2:30 PM, Terry Brown <[email protected] 
> > <javascript:>> wrote:
> >
> > ​...​
> >> I wonder if we should
> >> ​ ​
> >> be thinking about obsoleting these settings (and the split ratio
> >> one, ​ ​
> >> too).  As long as it works, and it already exists in free_layout,
> >> it ​ ​
> >> seems the "arrange the panes how you want and save the layout"
> >> approach ​ ​
> >> ​is simpler for all concerned.
> >
> > ​I agree.  This seems like the best idea.​
> >
> > Toggle split direction should (if it doesn't already) just call
> >> free_layouts rotate all function.
> >
> > ​That's exactly what it does:
> >
> > @cmd('toggle-split-direction')
> > def toggleSplitDirection(self, event=None):
> >     '''Toggle the split direction in the present Leo window.'''
> >     if hasattr(self.c, 'free_layout'):
> >         self.c.free_layout.get_top_splitter().rotate()
> > ​
> >
> >> Which, appropriately, has been relabeled "toggle split direction"
> >> in the pane layout menu.
> >
> > ​So it looks like we have a plan.  When docks work we can get rid
> > of several settings.  Until then, we can do nothing.
> >
> > 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to