-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global (singleton) docks #1289
Comments
Leo 6.1-devel, gui branch, build 6370998 command-line: python3 ./launchLeo.py --global-docks I know that including screenshots isn't considered good form here but as a writer, I sometimes struggle to be clear using just words. So low-resolution shots are used in this report and only where the alternative is a chapter or two of words. To prepare for testing of the gui branch with --global-docks I cleared all saved preferences from my OS window manager and deleted the global_data and g_app_db in the ~/.leo/db directory. First, here is a quick capture of my default workspace. I use @string central-dock-widget = body I spend most of my time in the body pane. The nested dock on the right contains all of the other docks. Very rarely do I need to see more than one of those docks at the same time. For certain types of Leo files I do use a three pane setup but for writing it is simply a waste of space. Here is the default arrangement of --global-docks maximized on my 1920x1080 screen. The splitter below Test 3 is immovable. It will not allow me to move it either up or down. It is clear that the window forcing the tall aspect is the central window. All four test docks can be moved and dropped back into the main window. They can also be floated. Test docks are totally inert with regard to the active window with useful things in it. ie. they are not drop targets for dock widgets or top level tabs (open Leo files) and nothing happens when you right click on the blank colored spaces. I am unsure as to what exactly the "global" docks are for. At this point they can all be turned off using the rioght-click pop-up menu on the title bars and I could use my two pane setup if not for the bottom part of the UI being not visible. Opening new Leo files works exactly the same as before. This last screenshot is one of an artifact that scales with the dock holding the main UI. I positioned the yellow Test dock under it to show it clearly. I am still working out why Leo has visible artifacts when using virtual python environments so until I get a handle on that I am using the default python/pyqt from my OS. Once I figure out what the problem is I will test the gui branch against other versions of both. HTH, Chris |
@technatica Thanks, Chris, for this detailed report. In this case, I agree that the screen shots are useful, because the "artifacts" (thin lines) are surprising. I don't see anything like them.
Did you also use both --init-docks and --global-docks?
Note that at present the Outlines dock is the central dock. Imo this is the only reasonable choice. The crucial question is whether you can rearrange Leo to your liking with --global-docks enabled.
It appears that local docks can't be made into global docks, and global docks can't be dropped into any Outline dock. In retrospect, this isn't too surprising. There is a *separate* QMainWindow for
a) the global window containing the Outlines dock, and
b) each local window for each separate outline.
Apparently, each dock can only be moved back to the QMainWindow that "owns"
it. This is probably a good thing.
The dummy global docks are purely for testing. I'll remove them when I merge the gui branch
into devel, which will happen soon, unless serious problems are reported.
Once devel supports global docks, the pyzo_in_leo plugin will be able to create proper pyzo docks, as Leo global docks. That's the entire reason for this project.
Thanks, Chris. Your testing is important to me.
It should be safe to merge gui soon, despite this being an experimental projects. Indeed, there are only 7 tests on g.app.use_global_docks within the entire gui branch. If the worst happens, I can just force use_global_docks to False.
|
Repeated all testing using both --global-docks and --init-docks after deleting the cache. All of the same behaviours are present including the artifact. |
@technatica Thanks. It's good to know.
|
I am going to close this issue. Imo, we can continue the exploration of "artifacts" in the pyzo branch. |
First discussed here. This is a precondition for #1093: pyzo features. The "gui" branch contains this work.
Status
This command-line option is permanent. The pyzo_in_leo plugin requires it.
Each tab in the Outlines dock contains an Outline dock (singular).
Each Outline dock looks and works exactly as before.
Global vs local docks
All of pyzo's docks must be global, with the possible exception of the File Browser dock.
Note: right-clicking the Outlines (plural) dock shows only global docks.
Note: The Outlines dock is the central widget of the new global Window, a QMainWindow.
This is how Leo has always worked. There are good reasons to keep things as they are.
Note: right-clicking each Outline (singular) dock shows only local docks.
Note: As before, the user can choose the central widget for each separate outline.
Code changes
g.app.use_global_docks marks all changes to the code in devel. Remarkably few are needed.
The DynamicWindow class is almost completely unchanged. Crucially, the following official ivars retain their legacy meanings:
The text was updated successfully, but these errors were encountered: