Author: rolf
Date: 2006-12-04 13:16:31 -0500 (Mon, 04 Dec 2006)
New Revision: 68980
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusBar.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusBarPanel.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarPanelTest.cs
Log:
In System.Windows.Forms:
* StatusBar.cs: Update all panels when a AutoSize=Contents
panel needs updating.
* StatusBarPanel.cs: Remove twidth and only use initialize.
Fixes #80031.
2006-12-04 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
In Test/System.Windows.Forms:
* StatusBarPanelTest.cs: Added a test for invalid
minimum widths.
2006-12-04 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-12-04 18:13:41 UTC (rev 68979)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-12-04 18:16:31 UTC (rev 68980)
@@ -1,4 +1,12 @@
2006-12-04 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * StatusBar.cs: Update all panels when a AutoSize=Contents
+ panel needs updating.
+
+ * StatusBarPanel.cs: Remove twidth and only use initialize.
+ Fixes #80031.
+
+2006-12-04 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* Form.cs: When a form's MdiParent is set add it directly
on top of the z-order in stead of relying on MdiClient's
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusBar.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusBar.cs
2006-12-04 18:13:41 UTC (rev 68979)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusBar.cs
2006-12-04 18:16:31 UTC (rev 68980)
@@ -278,6 +278,7 @@
internal void UpdatePanelContents (StatusBarPanel panel)
{
if (panel.AutoSize == StatusBarPanelAutoSize.Contents) {
+ UpdateStatusBar ();
Invalidate ();
return;
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusBarPanel.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusBarPanel.cs
2006-12-04 18:13:41 UTC (rev 68979)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/StatusBarPanel.cs
2006-12-04 18:16:31 UTC (rev 68980)
@@ -47,7 +47,6 @@
private StatusBarPanelBorderStyle border_style =
StatusBarPanelBorderStyle.Sunken;
private StatusBarPanelStyle style = StatusBarPanelStyle.Text;
private int width = 100;
- private int twidth = -1;
private int min_width = 10;
internal int X;
#endregion // Local Variables
@@ -114,6 +113,7 @@
min_width = value;
if (min_width > width)
width = min_width;
+
Invalidate ();
}
}
@@ -127,7 +127,7 @@
throw new ArgumentException ("value");
if (initializing)
- twidth = value;
+ width = value;
else
SetWidth(value);
@@ -208,11 +208,12 @@
public void EndInit ()
{
- if (!initializing || twidth == -1)
+ if (!initializing)
return;
-
- SetWidth(twidth);
- twidth = -1;
+
+ if (min_width > width)
+ width = min_width;
+
initializing = false;
}
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2006-12-04 18:13:41 UTC (rev 68979)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2006-12-04 18:16:31 UTC (rev 68980)
@@ -1,5 +1,10 @@
2006-12-04 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+ * StatusBarPanelTest.cs: Added a test for invalid
+ minimum widths.
+
+2006-12-04 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
* MdiFormTest.cs: Change a few tests to dispose of
the form when the test is finished.
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarPanelTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarPanelTest.cs
2006-12-04 18:13:41 UTC (rev 68979)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarPanelTest.cs
2006-12-04 18:16:31 UTC (rev 68980)
@@ -56,6 +56,14 @@
}
[Test]
+ [ExpectedException(typeof(ArgumentException))]
+ public void MinimumWidth4 ()
+ {
+ StatusBarPanel p = new StatusBarPanel ();
+ p.MinWidth = -50;
+ }
+
+ [Test]
public void MinWidth_AutoSize_None ()
{
StatusBarPanel p = new StatusBarPanel ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches