Author: aolk
Date: 2006-01-29 04:53:24 -0500 (Sun, 29 Jan 2006)
New Revision: 56216

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeClearlooks.cs
Log:
2006-01-29  Alexander Olk  <[EMAIL PROTECTED]>

        * ThemeClearlooks.cs: Fixed a crash in ProgressBar drawing.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-01-29 08:39:14 UTC (rev 56215)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-01-29 09:53:24 UTC (rev 56216)
@@ -1,3 +1,7 @@
+2006-01-29  Alexander Olk  <[EMAIL PROTECTED]>
+
+       * ThemeClearlooks.cs: Fixed a crash in ProgressBar drawing.
+
 2006-01-20  Mike Kestner  <[EMAIL PROTECTED]>
 
        * Form.cs: Add ActiveTracker property to do Captures and perform mouse

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeClearlooks.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeClearlooks.cs   
    2006-01-29 08:39:14 UTC (rev 56215)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeClearlooks.cs   
    2006-01-29 09:53:24 UTC (rev 56216)
@@ -727,9 +727,12 @@
                        dc.DrawLine( tmp_pen, ctrl.ClientRectangle.X + 1, 
ctrl.ClientRectangle.Bottom - 1, ctrl.ClientRectangle.Right - 2, 
ctrl.ClientRectangle.Bottom - 1 );
                        dc.DrawLine( tmp_pen, ctrl.ClientRectangle.X, 
ctrl.ClientRectangle.Y + 1, ctrl.ClientRectangle.X, ctrl.ClientRectangle.Bottom 
- 2 );
                        
-                       if ( barpos_pixels == 0 )
+                       if ( barpos_pixels <= 0 )
                                return;
                        
+                       if ((bar.Width - 2) <= 0 || (bar.Height - 1) <= 0)
+                               return;
+                       
                        // Draw bar
                        dc.DrawRectangle( ResPool.GetPen( 
combobox_focus_border_color ), bar.X - 1, bar.Y - 1, bar.Width, bar.Height + 1 
);
                        tmp_pen = ResPool.GetPen( 
progressbar_inner_border_color );

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

Reply via email to