[MonoDevelop] Patch for the docking in MD
Vladimir Dimitrov
vlad.dimitrov at gmail.com
Mon Jan 17 06:25:49 EST 2011
Hi all,
We use the docking code from MD for our projects and have just discovered
and fixed a bug that is happening when we have a default size of panels set
to some value, and the docking logic was not respecting it. The case
happened to be that when a new size is allocated for the DockLayout not all
of the children items are reallocated.
So I changed the method CalcNewSizes in DockGroup.cs to end in this way:
double expandSize = realSize
- noexpandSize;
foreach (DockObject ob in
VisibleObjects) {
if
(!hasExpandItems)
ob.Size = (ob.DefaultSize / noexpandSize) * realSize;
else if
(ob.Expand)
ob.Size = (ob.DefaultSize / defaultExpandSize) * expandSize;
ob.PrefSize
= ob.Size;
}
CheckMinSizes ();
foreach (DockObject ob in
VisibleObjects) {
DockGroup group = ob as DockGroup;
if (group == null)
continue;
group.CalcNewSizes ();
}
The added loop recalculates the sizes of the children recursively and this
fixed the issue on our side, so if anybody is interested in fixing in MD
this please try the patch.
Vladimir Dimitrov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20110117/98ddea08/attachment-0001.html
More information about the Monodevelop-list
mailing list