correct height. Otherwise when there are no menus we don't get
our
icon and buttons.
svn path=/trunk/mcs/; revision=57802
height.
* MdiWindowManager.cs: Use the MaximizedMenu for calculating
height.
+ - Add a dummy item to the maximized menu so it always has the
+ correct height. Otherwise when there are no menus we don't get our
+ icon and buttons.
2006-03-10 Jackson Harper <jackson@ximian.com>
res.MergeMenu (clone);
}
+ res.MenuItems.Add (new MenuItem ()); // Dummy item to get the menu height correct
+
res.SetForm (parent);
return res;
}
private void MeasureIconMenuItem (object sender, MeasureItemEventArgs me)
{
Form parent = (Form) mdi_container.Parent;
- int size = MaximizedMenu.Height;
+ int size = MaximizedMenu.MenuItems [0].MenuHeight;
me.ItemHeight = size;
me.ItemWidth = size + 2; // some padding
}