Author: jpobst
Date: 2007-01-17 18:16:38 -0500 (Wed, 17 Jan 2007)
New Revision: 71236

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
Log:
2007-01-17  Jonathan Pobst  <[EMAIL PROTECTED]>

        * Control.cs: If the control has a transparent background, we
        need to refresh it when it moves and when it's parent's background
        image changes.  [Fixes bug #80451]

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-01-17 23:13:01 UTC (rev 71235)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-01-17 23:16:38 UTC (rev 71236)
@@ -1,5 +1,11 @@
 2007-01-17  Jonathan Pobst  <[EMAIL PROTECTED]>
 
+       * Control.cs: If the control has a transparent background, we
+       need to refresh it when it moves and when it's parent's background
+       image changes.  [Fixes bug #80451]
+
+2007-01-17  Jonathan Pobst  <[EMAIL PROTECTED]>
+
        * XplatUIWin32.cs: Don't use 2.0 methods in 1.1 code!  Doh!
 
 2007-01-17  Jonathan Pobst  <[EMAIL PROTECTED]>

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2007-01-17 23:13:01 UTC (rev 71235)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2007-01-17 23:16:38 UTC (rev 71236)
@@ -4287,6 +4287,9 @@
 
                        if (moved) {
                                OnLocationChanged(EventArgs.Empty);
+                               
+                               if (this.background_color == Color.Transparent)
+                                       Invalidate ();
                        }
 
                        if (resized) {
@@ -5190,7 +5193,7 @@
 
                [EditorBrowsable(EditorBrowsableState.Advanced)]
                protected virtual void OnParentBackgroundImageChanged(EventArgs 
e) {
-                       if (background_color.IsEmpty && background_image==null) 
{
+                       if ((background_color.IsEmpty || background_color == 
Color.Transparent) && background_image==null) {
                                Invalidate();
                                OnBackgroundImageChanged(e);
                        }

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

Reply via email to