Author: calberto
Date: 2007-05-11 00:58:47 -0400 (Fri, 11 May 2007)
New Revision: 77193

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
Log:
2007-05-10  Carlos Alberto Cortez <[EMAIL PROTECTED]>

        * ThemeWinClassic.cs: For .Net 2.0 don't draw any image
        if we are using checkboxes, checked is true, and we have less
        than two images in StateImageList; for the 1.1 in the same scenario
        draw the first image if we have at least one image in StateImageList.
        Fixes part of #81191.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-11 04:43:07 UTC (rev 77192)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-05-11 04:58:47 UTC (rev 77193)
@@ -1,3 +1,11 @@
+2007-05-10  Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+       * ThemeWinClassic.cs: For .Net 2.0 don't draw any image
+       if we are using checkboxes, checked is true, and we have less
+       than two images in StateImageList; for the 1.1 in the same scenario
+       draw the first image if we have at least one image in StateImageList.
+       Fixes part of #81191.
+
 2007-05-10  Jonathan Pobst  <[EMAIL PROTECTED]>
 
        * ToolStrip.cs, ToolStripManager.cs: We need to remove items from

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2007-05-11 04:43:07 UTC (rev 77192)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2007-05-11 04:58:47 UTC (rev 77193)
@@ -2373,10 +2373,18 @@
                                        }
                                }
                                else {
-                                       if (item.Checked && 
control.StateImageList.Images.Count > 1)
-                                               control.StateImageList.Draw 
(dc, rect_checkrect.Location, 1);
-                                       else if 
(control.StateImageList.Images.Count > 0)
-                                               control.StateImageList.Draw 
(dc, rect_checkrect.Location, 0);
+                                       int simage_idx;
+                                       if (item.Checked)
+#if NET_2_0
+                                               simage_idx = 
control.StateImageList.Images.Count > 1 ? 1 : -1;
+#else
+                                               simage_idx = 
control.StateImageList.Images.Count > 1 ? 1 : 0;
+#endif
+                                       else
+                                               simage_idx = 
control.StateImageList.Images.Count > 0 ? 0 : -1;
+
+                                       if (simage_idx > -1)
+                                               control.StateImageList.Draw 
(dc, rect_checkrect.Location, simage_idx);
                                }
                        }
 

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

Reply via email to