2007-09-18 Jonathan Pobst <monkey@jpobst.com>
authorJonathan Pobst <monkey@jpobst.com>
Tue, 18 Sep 2007 15:04:36 +0000 (15:04 -0000)
committerJonathan Pobst <monkey@jpobst.com>
Tue, 18 Sep 2007 15:04:36 +0000 (15:04 -0000)
* ToolStrip.cs: Set AutoSizeMode back to GrowAndShrink to refix
bug #325406, but set a minimum for StatusStrip to 22 to keep
bug #325390 fixed.  I think this minimum would have been figured
up automatically if the grip was actually a ToolStripItem, but it
currently is not.

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

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs

index 83dc6a831b977fec6c5eaa7a9179b44cc8ac53c9..23927d2d3c6a3bf659f93d192d13a979317b548f 100644 (file)
@@ -1,3 +1,11 @@
+2007-09-18  Jonathan Pobst  <monkey@jpobst.com>
+
+       * ToolStrip.cs: Set AutoSizeMode back to GrowAndShrink to refix
+       bug #325406, but set a minimum for StatusStrip to 22 to keep
+       bug #325390 fixed.  I think this minimum would have been figured
+       up automatically if the grip was actually a ToolStripItem, but it
+       currently is not.
+
 2007-09-18  Carlos Alberto Cortez <calberto.cortez@gmail.com>
 
        * ListView.cs: max_label_wrapping is now 30 pixels instead of 38,
index 59a6d7dda4c42138a8579863765721ef97a98eae..bec17d1b73d1026d849159bf1b7e491aeeb67c15 100644 (file)
@@ -98,6 +98,7 @@ namespace System.Windows.Forms
                        this.items = new ToolStripItemCollection (this, items, true);
                        this.allow_merge = true;
                        base.AutoSize = true;
+                       this.SetAutoSizeMode (AutoSizeMode.GrowAndShrink);
                        this.back_color = Control.DefaultBackColor;
                        this.can_overflow = true;
                        base.CausesValidation = false;
@@ -1431,6 +1432,9 @@ namespace System.Windows.Forms
                                if (new_size.Height == 0)
                                        new_size.Height = ExplicitBounds.Height;
 
+                               if (this is StatusStrip)
+                                       new_size.Height = Math.Max (new_size.Height, 22);
+                                       
                                return new_size;
                        }
                }