* Form.cs: We need to use the ActiveMenu when calculating menu
authorJackson Harper <jackson@novell.com>
Fri, 10 Mar 2006 21:34:53 +0000 (21:34 -0000)
committerJackson Harper <jackson@novell.com>
Fri, 10 Mar 2006 21:34:53 +0000 (21:34 -0000)
        height.
        * MdiWindowManager.cs: Use the MaximizedMenu for calculating
        height.

svn path=/trunk/mcs/; revision=57797

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/MdiWindowManager.cs

index 2a26c158675927c02455e6c785ec669f1e5c5669..5b11296e016268ec5b0323c88c8a624137fd4027 100644 (file)
@@ -1,3 +1,10 @@
+2006-03-10  Jackson Harper  <jackson@ximian.com>
+
+       * Form.cs: We need to use the ActiveMenu when calculating menu
+       height.
+       * MdiWindowManager.cs: Use the MaximizedMenu for calculating
+       height.
+
 2006-03-10  Jackson Harper  <jackson@ximian.com>
 
        * MenuAPI.cs: Make this available elsewhere. I need it in some MDI
index 4ed4abd3367e67079dbb156404b00b4953809dcc..7d745a02c19837617a90f45bc2d1dcd91cc9e565 100644 (file)
@@ -1706,7 +1706,7 @@ namespace System.Windows.Forms {
                                                ncp = (XplatUIWin32.NCCALCSIZE_PARAMS)Marshal.PtrToStructure(m.LParam, typeof(XplatUIWin32.NCCALCSIZE_PARAMS));
 
                                                // Adjust for menu
-                                               ncp.rgrc1.top += ThemeEngine.Current.CalcMenuBarSize (DeviceContext, menu, ClientSize.Width);
+                                               ncp.rgrc1.top += ThemeEngine.Current.CalcMenuBarSize (DeviceContext, ActiveMenu, ClientSize.Width);
                                                Marshal.StructureToPtr(ncp, m.LParam, true);
                                        }
                                        DefWndProc(ref m);
index 41c66892c6588c0718ba6329b27cd7b65fcbfc10..8e8003ad3ccc4ccd1b603394668d0725626ad025 100644 (file)
@@ -86,7 +86,6 @@ namespace System.Windows.Forms {
                {
                        Form parent = (Form) mdi_container.Parent;
                        MainMenu res = new MainMenu ();
-                       
 
                        res.MenuItems.Add (icon_menu);
 
@@ -129,7 +128,7 @@ namespace System.Windows.Forms {
                private void MeasureIconMenuItem (object sender, MeasureItemEventArgs me)
                {
                        Form parent = (Form) mdi_container.Parent;
-                       int size = parent.Menu.Height;
+                       int size = MaximizedMenu.Height;
                        me.ItemHeight = size;
                        me.ItemWidth = size + 2; // some padding
                }