[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-patches
Subject:    [Mono-patches] r99468 -
From:       "Jonathan Pobst (monkey () jpobst ! com)" <mono-patches-list () lists ! ximian ! com>
Date:       2008-03-31 20:12:05
Message-ID: 20080331201205.B0A329472C () mono-cvs ! ximian ! com
[Download RAW message or body]

Author: jpobst
Date: 2008-03-31 15:12:04 -0500 (Mon, 31 Mar 2008)
New Revision: 99468

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
Log:
2008-03-31  Jonathan Pobst  <monkey@jpobst.com>

	* ToolBar.cs: Don't do our painting if UserPaint is set.  If UserPaint
	isn't set, don't call OnPaint.  [Fixes bug #375300]

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog	2008-03-31 \
                20:09:36 UTC (rev 99467)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog	2008-03-31 \
20:12:04 UTC (rev 99468) @@ -1,3 +1,8 @@
+2008-03-31  Jonathan Pobst  <monkey@jpobst.com>
+
+	* ToolBar.cs: Don't do our painting if UserPaint is set.  If UserPaint
+	isn't set, don't call OnPaint.  [Fixes bug #375300]
+
 2008-03-30  Carlos Alberto Cortez <calberto.cortez@gmail.com>
 
 	* BindingSource.cs: IsBindingSuspended, ResumeBinding and

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs	2008-03-31 \
                20:09:36 UTC (rev 99467)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs	2008-03-31 \
20:12:04 UTC (rev 99468) @@ -912,7 +912,13 @@
 
 		internal override void OnPaintInternal (PaintEventArgs pevent)
 		{
+			if (GetStyle (ControlStyles.UserPaint))
+				return;
+				
 			ThemeEngine.Current.DrawToolBar (pevent.Graphics, pevent.ClipRectangle, this);
+			
+			// Toolbars do not raise OnPaint unless UserPaint is set
+			pevent.Handled = true;
 		}
 
 		internal void Redraw (bool recalculate)

_______________________________________________
Mono-patches maillist  -  Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic