>
>
> I'm pretty clueless about the Qt docks code myself. Leo is creating a new 
> QMainWindow for every outline. (Each DynamicWindow is a subclass of 
> QMainWindow). That may be causing problems, maybe even exposing a latent Qt 
> bug.
>
> There is a *lot* of cruft in the docks-related code. Recent code has 
> (supposedly!) changed over to using a single set of global Qt docks.
>
>
I have tried docks once and gave up them shortly. This morning I decided to 
look at them again and try to help with this issue (if I can).

Initial look was awful. Then it was too easy to mess up docks so much that 
the layout become totally unusable. I very much dislike clearing my cache 
because I keep there some data important for my work process, so I tried to 
delete only entries related to dock layout using script. But, those entries 
are saved again when closing Leo and they are saved in unmanageable state 
again. I had to delete entries using script and then to kill Leo, to start 
again with the default layout. Then I realized that in order to achieve my 
usual layout (like the one I use without docks: body on the right side from 
top to bottom, and on the left outline above tabs), I have to change 
setting @string central-dock-widget=body. Once I added this setting and 
restarted Leo, layout got broken again because saved layout had different 
central widget. When I finally managed to adjust layout to my liking, I 
have saved and closed Leo. On the next start layout was well preserved, but 
hitting Ctrl-n (new outline), I got again default layout, not the copy of 
first open Leo layout. This is most likely because setting 
central-dock-widget was local to the first file, and new outline got the 
default value for this setting and therefore the layout of the first loaded 
outline can't be applied.

I would be really surprised if a newbie had enough patience and commitment 
to adjust the initial layout to something usable.

Then I compared docks and no-docks Leo window. The only difference is that 
in docks all three panes (outline, body and tabs) have small label above. 
In effect it reduces useful screen space. So, I wander what are the reasons 
that one would prefer docks over no-docks layout.

Can anyone who uses docks and prefer docks explain me what are the benefits 
of using docks? Perhaps I miss something and I am not using them correctly.

Anyway, I think that it isn't enough to have just single hard-coded value 
in app.defaultWindowState. If this state can't be applied when 
central-dock-widget isn't the same as was used in this hard-coded value. 
There should be hard-coded value for each possible value of 
central-dock-widget. Perhaps these values might be stored in the theme 
files. There should be a command to launch a dialog for selecting one of 
the predefined layouts. If one messes up docks layout, this command should 
allow easy restoring layout to something usable.

It might be useful to have a command which would add current layout to the 
list of predefined layouts (that can be selected from the dialog) and a 
setting which one should be used for new outlines.

Unless I learn about some feature of the docks interface that makes it 
superior over the no-docks interface, I will stick to the no-docks 
interface.

Vitalije

-- 
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/c026d1d0-6bb2-478e-a35b-f1c708eecc95o%40googlegroups.com.

Reply via email to