* StatusBar.cs: We only need to update the sizes of the other
authorJackson Harper <jackson@novell.com>
Thu, 25 May 2006 17:41:39 +0000 (17:41 -0000)
committerJackson Harper <jackson@novell.com>
Thu, 25 May 2006 17:41:39 +0000 (17:41 -0000)
        panels when we have auto size contents.  Also we are only
updating
        the contents of the panel, not the borders, so compensate for
the
        border width (TODO: get this width from the theme somehow).

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

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

index e12536eb61f051aeaf1e571a8a61cf62a5bcd796..153bd98cd937b8187a16d1ff4b0e63990961a690 100644 (file)
@@ -1,3 +1,10 @@
+2006-05-25  Jackson Harper  <jackson@ximian.com>
+
+       * StatusBar.cs: We only need to update the sizes of the other
+       panels when we have auto size contents.  Also we are only updating
+       the contents of the panel, not the borders, so compensate for the
+       border width (TODO: get this width from the theme somehow).
+
 2006-05-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * Application.cs: set the DialogResult to fixed when the main form is
index 87922dd494eb7088c23848124932032c3f69731f..40f268645d0beeaefc51987c933fef80f47efb25 100644 (file)
@@ -275,17 +275,12 @@ namespace System.Windows.Forms {
 
                internal void UpdatePanelContents (StatusBarPanel panel)
                {
-                       if (panel.AutoSize == StatusBarPanelAutoSize.None){
-                               Invalidate (new Rectangle (panel.X, 0, panel.Width, bounds.Height), false);
-                               return;
-                       }
-                       
                        if (panel.AutoSize == StatusBarPanelAutoSize.Contents) {
-                               Update ();
+                               Invalidate ();
                                return;
                        }
 
-                       Update ();
+                       Invalidate (new Rectangle (panel.X + 2, 2, panel.Width - 4, bounds.Height - 4));
                }
 
                internal void Update ()