On Fri, Jul 19, 2024 at 6:10 AM Thomas Passin <[email protected]> wrote:
> We've been discussing how to create new layouts for Leo now that the old > nested-splitter system is gone - see > https://groups.google.com/g/leo-editor/c/nLfhTgnPcEc > > That thread includes a number of interesting scripts that can create new > layouts. But they all have a serious problem: they all assume they are > starting from Leo's default layout and they have no way of knowing if the > actual layout has been changed before the script is run. If it has, the > resulting layout will not be what was intended. > Yes, this is a potential problem, but it will only be a problem if a user dynamically switches between layouts with `@button` or `@command` nodes. Plugins that change layouts probably don't have to worry about unexpected layouts. Anyway, scripts can test the parents of various widgets to see if those parents are as expected. If not, the script could restore the layout to a known starting point before changing the layout. In short, a bit more work is needed. 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 view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS0wNo-ShL7mJpghgvd3pmB3DGW%2Bjs4u%3DKmX9YH03qvjRw%40mail.gmail.com.
