Author: jpobst
Date: 2007-02-28 15:35:20 -0500 (Wed, 28 Feb 2007)
New Revision: 73569
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/DefaultLayout.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs
Log:
2007-02-28 Jonathan Pobst <[EMAIL PROTECTED]>
* DefaultLayout.cs: Use ClientRectangle instead of DisplayRectangle
to layout children because DisplayRectangle can be overridden.
[Fixes bug #80917]
2007-02-28 Jonathan Pobst <[EMAIL PROTECTED]>
* DefaultLayoutTest.cs: Add test for bug #80917.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
2007-02-28 18:53:45 UTC (rev 73568)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/ChangeLog
2007-02-28 20:35:20 UTC (rev 73569)
@@ -1,3 +1,9 @@
+2007-02-28 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * DefaultLayout.cs: Use ClientRectangle instead of DisplayRectangle
+ to layout children because DisplayRectangle can be overridden.
+ [Fixes bug #80917]
+
2007-02-14 Jonathan Pobst <[EMAIL PROTECTED]>
* FlowLayout.cs: Add support for laying out ToolStrips, which
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/DefaultLayout.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/DefaultLayout.cs
2007-02-28 18:53:45 UTC (rev 73568)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Layout/DefaultLayout.cs
2007-02-28 20:35:20 UTC (rev 73569)
@@ -35,7 +35,7 @@
{
void LayoutDockedChildren (Control parent, Control[] controls)
{
- Rectangle space = parent.DisplayRectangle;
+ Rectangle space = parent.ClientRectangle;
MdiClient mdi = null;
// Deal with docking; go through in reverse, MS docs
say that lowest Z-order is closest to edge
@@ -92,7 +92,7 @@
void LayoutAnchoredChildren (Control parent, Control[] controls)
{
- Rectangle space = parent.DisplayRectangle;
+ Rectangle space = parent.ClientRectangle;
for (int i = 0; i < controls.Length; i++) {
int left;
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-02-28 18:53:45 UTC (rev 73568)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-02-28 20:35:20 UTC (rev 73569)
@@ -1,3 +1,7 @@
+2007-02-28 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * DefaultLayoutTest.cs: Add test for bug #80917.
+
2007-02-26 Gert Driesen <[EMAIL PROTECTED]>
* ListViewCollectionsTest.cs: Added and improved tests for removing
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs
2007-02-28 18:53:45 UTC (rev 73568)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs
2007-02-28 20:35:20 UTC (rev 73569)
@@ -371,6 +371,31 @@
public void DockChanged_Handler (object sender, EventArgs e)
{
event_raised += "DockStyleChanged";
+ }
+
+ [Test] // bug #80917
+ public void BehaviorOverriddenDisplayRectangle ()
+ {
+ Control c = new Control ();
+ c.Anchor |= AnchorStyles.Bottom;
+ c.Size = new Size (100, 100);
+
+ Form f = new DisplayRectangleForm ();
+ f.Controls.Add (c);
+ f.ShowInTaskbar = false;
+ f.Show ();
+
+ Assert.AreEqual (new Size (100, 100), c.Size, "A1");
+
+ f.Dispose ();
+ }
+
+ private class DisplayRectangleForm : Form
+ {
+ public override Rectangle DisplayRectangle
+ {
+ get { return Rectangle.Empty; }
+ }
}
}
@@ -423,7 +448,8 @@
[Test]
public void TestDockFillFirst ()
{
- Form f = new Form ();
+ Form f = new Form ();
+ f.ShowInTaskbar = false;
Panel b1 = new Panel ();
Panel b2 = new Panel ();
@@ -443,7 +469,8 @@
[Test]
public void TestDockFillLast ()
{
- Form f = new Form ();
+ Form f = new Form ();
+ f.ShowInTaskbar = false;
Panel b1 = new Panel ();
Panel b2 = new Panel ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches