Author: everaldo
Date: 2006-11-03 02:18:34 -0500 (Fri, 03 Nov 2006)
New Revision: 67310

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
Log:
Dont paint inner lines of 3D border when it dont need

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-03 06:10:53 UTC (rev 67309)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-03 07:18:34 UTC (rev 67310)
@@ -1,3 +1,8 @@
+2006-11-03  Everaldo Canuto  <[EMAIL PROTECTED]>
+
+       * ThemeWin32Classic.cs: Dont paint inner lines of 3D border when
+       it dont need.  Fixes #79537.
+
 2006-11-02  Jackson Harper  <[EMAIL PROTECTED]>
 
        * X11Dnd.cs: We always allow copy, since XDND implies Copy.  Also

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2006-11-03 06:10:53 UTC (rev 67309)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2006-11-03 07:18:34 UTC (rev 67310)
@@ -4862,22 +4862,26 @@
                        
                        if ((sides & Border3DSide.Left) != 0) {
                                graphics.DrawLine (penTopLeft, rect.Left, 
rect.Bottom - 2, rect.Left, rect.Top);
-                               graphics.DrawLine (penTopLeftInner, rect.Left + 
1, rect.Bottom - 2, rect.Left + 1, rect.Top);
+                               if (rect.Width > 2)
+                                       graphics.DrawLine (penTopLeftInner, 
rect.Left + 1, rect.Bottom - 2, rect.Left + 1, rect.Top);
                        }
                        
                        if ((sides & Border3DSide.Top) != 0) {
                                graphics.DrawLine (penTopLeft, rect.Left, 
rect.Top, rect.Right - 2, rect.Top);
-                               graphics.DrawLine (penTopLeftInner, rect.Left + 
1, rect.Top + 1, rect.Right - 3, rect.Top + 1);
+                               if (rect.Height > 2)
+                                       graphics.DrawLine (penTopLeftInner, 
rect.Left + 1, rect.Top + 1, rect.Right - 3, rect.Top + 1);
                        }
                        
                        if ((sides & Border3DSide.Right) != 0) {
                                graphics.DrawLine (penBottomRight, rect.Right - 
1, rect.Top, rect.Right - 1, rect.Bottom - 1);
-                               graphics.DrawLine (penBottomRightInner, 
rect.Right - 2, rect.Top + 1, rect.Right - 2, rect.Bottom - 2);
+                               if (rect.Width > 3)
+                                       graphics.DrawLine (penBottomRightInner, 
rect.Right - 2, rect.Top + 1, rect.Right - 2, rect.Bottom - 2);
                        }
                        
                        if ((sides & Border3DSide.Bottom) != 0) {
                                graphics.DrawLine (penBottomRight, rect.Left, 
rect.Bottom - 1, rect.Right - 1, rect.Bottom - 1);
-                               graphics.DrawLine (penBottomRightInner, 
rect.Left + 1, rect.Bottom - 2, rect.Right - 2, rect.Bottom - 2);
+                               if (rect.Height > 3)
+                                       graphics.DrawLine (penBottomRightInner, 
rect.Left + 1, rect.Bottom - 2, rect.Right - 2, rect.Bottom - 2);
                        }
                }
 

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

Reply via email to