Author: toshok
Date: 2006-10-18 14:39:12 -0400 (Wed, 18 Oct 2006)
New Revision: 66797

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
Log:
        * Form.cs: when getting the backcolor of the form, don't get
        base.BackColor, as this allows parents to influence the background
        color.  This breaks mdi forms.  Instead, if the background_color
        is empty, return the default.

2006-10-18  Chris Toshok  <[EMAIL PROTECTED]>



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-10-18 18:13:16 UTC (rev 66796)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-10-18 18:39:12 UTC (rev 66797)
@@ -1,5 +1,12 @@
 2006-10-18  Chris Toshok  <[EMAIL PROTECTED]>
 
+       * Form.cs: when getting the backcolor of the form, don't get
+       base.BackColor, as this allows parents to influence the background
+       color.  This breaks mdi forms.  Instead, if the background_color
+       is empty, return the default.
+
+2006-10-18  Chris Toshok  <[EMAIL PROTECTED]>
+
        * XplatUIX11.cs: change some debug ifdefs, and return XGetParent
        to being private instead of internal static.
 

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs  
2006-10-18 18:13:16 UTC (rev 66796)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs  
2006-10-18 18:39:12 UTC (rev 66797)
@@ -282,7 +282,14 @@
 
                public override Color BackColor {
                        get {
-                               return base.BackColor;
+                               /* we don't let parents override our
+                                default background color for forms.
+                                this fixes the default color for mdi
+                                children. */
+                               if (background_color.IsEmpty)
+                                       return DefaultBackColor;
+                               else
+                                       return background_color;
                        }
                        set {
                                base.BackColor = value;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to