Author: jpobst
Date: 2007-12-14 11:15:49 -0500 (Fri, 14 Dec 2007)
New Revision: 91296

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

        * ThemeWin32Classic.cs: Don't draw the background on a
        flat button if there is a background image.
        [Fixes bug #348649]

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-12-14 15:53:56 UTC (rev 91295)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-12-14 16:15:49 UTC (rev 91296)
@@ -1,3 +1,9 @@
+2007-12-14  Jonathan Pobst  <[EMAIL PROTECTED]>
+
+       * ThemeWin32Classic.cs: Don't draw the background on a
+       flat button if there is a background image.
+       [Fixes bug #348649]
+
 2007-12-13  Carlos Alberto Cortez <[EMAIL PROTECTED]>
 
        * ListBox.cs: If we remove the item currently selected,

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2007-12-14 15:53:56 UTC (rev 91295)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2007-12-14 16:15:49 UTC (rev 91296)
@@ -208,7 +208,8 @@
                public override void DrawFlatButton (Graphics g, Button b, 
Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle)
                {
                        // Draw Button Background
-                       DrawFlatButtonBackground (g, b, clipRectangle);
+                       if (b.BackgroundImage == null)
+                               DrawFlatButtonBackground (g, b, clipRectangle);
 
                        // If we have an image, draw it
                        if (imageBounds.Size != Size.Empty)

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

Reply via email to