Status of #1150: Optional dock widgets

71 views
Skip to first unread message

Edward K. Ream

unread,
May 22, 2019, 6:26:16 PM5/22/19
to leo-editor
Leo now sports optional dockable widgets, as described in #1150.  All the work is being done in the "dock" branch.

To enable, add --dock to the command line. Leo remains completely unchanged otherwise.

As you will see, the "Tabs" dock replaces the Log pane.  However, the Tabs dock works exactly as before, except that it can be moved, etc, just like any other dockable widget.

Making the Tabs dock work like the Log pane collapsed the complexity of the code and avoided any drastic gui changes. Very little of Leo's code has actually changed. There is no need to modify any plugin, or remove Leo's nested splitter code.

The only other gui-related change will be to put each additional body editor in its own dockable widget.  That's the next task. I'll merge "dock" into "devel" only when this task is complete.

Straightforward additions to Leo's theme (.leo) files will adapt the theme to dockable widgets. 

Summary

Leo will use docks only if --docks appears on the command line.

Leo looks and feels essentially the same regardless of --dock.

Dockable widgets will always be optional.

A few other straightforward tasks remain. See #1150 for details details.

Edward

Edward K. Ream

unread,
May 22, 2019, 6:43:45 PM5/22/19
to leo-editor


On Wednesday, May 22, 2019 at 5:26:16 PM UTC-5, Edward K. Ream wrote:
Leo now sports optional dockable widgets, as described in #1150

Here is a screen shot:

Chris George

unread,
May 23, 2019, 9:21:29 AM5/23/19
to leo-e...@googlegroups.com
Wow.

I usually work with a couple of Leo files on the go at the same time.



first_file.png

Once I pull a tab on a file and position it how I like it is persistent. ie. that tab remains on the screen when I change files but the content doesn't change. This is pretty handy.
second_file.png

But once I close a tab it is gone for the rest of that session. ie. I closed all three tabs for the "My Life" file and now when I go back to select that file the three tabs are gone.

blank.png

With this functionality, I may have to consider going back to a multi-monitor setup. :-)

Chris


--
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 leo-editor+...@googlegroups.com.
To post to this group, send email to leo-e...@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/61277e07-f32c-40f6-a963-f58a90131ce4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Edward K. Ream

unread,
May 23, 2019, 11:13:18 AM5/23/19
to leo-editor
On Thu, May 23, 2019 at 8:21 AM Chris George <techn...@gmail.com> wrote:

> Wow.

Thanks.  I'm pretty pumped myself.

I'm working on saving/restoring all aspects of the main window.  This is straightforward using QMainWindow methods designed to do exactly that.

> But once I close a tab it is gone for the rest of that session. ie. I closed all three tabs for the "My Life" file and now when I go back to select that file the three tabs are gone.

Good catch.  There are at least two possible solutions:

1. Done in rev df7050. Don't allow Leo's outline, body and tabs docks to be closed.  For now, I think this good enough.  Naturally, additional body panes (soon to be in separate docks) will be closable.

2. Do allow all docks to be closed, and add new commands to re-open them.  Not clear that this additional "flexibility" will be useful.

Your comments?

Edward

Edward K. Ream

unread,
May 23, 2019, 12:25:50 PM5/23/19
to leo-editor
On Wednesday, May 22, 2019 at 5:26:16 PM UTC-5, Edward K. Ream wrote:
Leo now sports optional dockable widgets, as described in #1150.

As of rev 70506b, Leo saves/restores window geometry and the location of all dock widgets and toolbars.

Edward

Edward K. Ream

unread,
May 23, 2019, 12:50:08 PM5/23/19
to leo-editor
On Thursday, May 23, 2019 at 11:25:50 AM UTC-5, Edward K. Ream wrote:

> As of rev 70506b, Leo saves/restores window geometry and the location of all dock widgets and toolbars.

Not having a central widget has its problems.  Once all widgets have been undocked (floated), there seems to be no way to put them back!  Except by clearing the c.db cache completely.

Not sure this will be a problem in practice.  Let me know...

Edward

Edward K. Ream

unread,
May 23, 2019, 1:20:34 PM5/23/19
to leo-editor
On Thursday, May 23, 2019 at 11:50:08 AM UTC-5, Edward K. Ream wrote:

> Once all widgets have been undocked (floated), there seems to be no way to put them back!

Happily, not true, and not related to the lack of central widget.  There just has to be vertical room for the widgets. Just resize the main window.  I'll also reduce the minimum size of the widgets.

Edward

Chris George

unread,
May 23, 2019, 2:21:15 PM5/23/19
to leo-editor
 When opening Leo I get the following in the terminal:

chris@technatica:~/leo-editor$ python3 ./launchLeo.py --dock

setting leoID
from os.getenv('USER'): 'chris'
Leo 6.0-devel, dock branch, build 96296149a5
2019-05-23 06:53:33 -0500

Duplicate dock name: 'outline'

Duplicate dock name: 'body'

Duplicate dock name: 'tabs'

Duplicate dock name: 'outline'

Duplicate dock name: 'body'

Duplicate dock name: 'tabs'


I had three files open when I closed the previous session.

Would it not then make sense to give each dock a unique name? And would this not then lend itself to presenting a list of all currently open docks? Then the user could select the dock desired and have it present itself back in its last known position.

I will need to use it a little more in a multi-file session to see if more ideas come up.


The docks are not restricted to the main UI for placement on a screen. They do follow the main UI though when it comes to maximize/minimize which limits the usefulness. The docks also do not show up in my desktop environment's window manager. Is it possible to truly cut them loose and give the docks their own independent ability to maximize/minimize? I think this would also allow them to utilize all of the window manager's features like "Kepp Above", "Keep Below", "Move" etc.

If it isn't possible to cut them loose, would it not be helpful to be able to minimize a dock and have a mechanism by which it could be "maximized" back to its original position before minimizing?


Again, I will need more time fiddling to come up with more ideas.

Chris

Edward K. Ream

unread,
May 23, 2019, 6:16:07 PM5/23/19
to leo-editor
On Thu, May 23, 2019 at 1:21 PM Chris George <techn...@gmail.com> wrote:
 When opening Leo I get the following in the terminal:

That should have been fixed in a later rev.

Edward
Reply all
Reply to author
Forward
0 new messages