Author: pbartok
Date: 2006-01-13 14:16:29 -0500 (Fri, 13 Jan 2006)
New Revision: 55538

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
Log:
2006-01-13  Peter Dennis Bartok  <[EMAIL PROTECTED]> 

        * TreeView.cs: Draw the focus rectangle outside the highlight, to
          make sure it's always visible. Fixes #76680.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-01-13 18:38:19 UTC (rev 55537)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-01-13 19:16:29 UTC (rev 55538)
@@ -1,3 +1,8 @@
+2006-01-13  Peter Dennis Bartok  <[EMAIL PROTECTED]> 
+
+       * TreeView.cs: Draw the focus rectangle outside the highlight, to
+         make sure it's always visible. Fixes #76680.
+
 2006-01-13  Peter Dennis Bartok  <[EMAIL PROTECTED]>
 
        * TreeView.cs: Implemented Wheel scrolling. Fixes #76531

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2006-01-13 18:38:19 UTC (rev 55537)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2006-01-13 19:16:29 UTC (rev 55538)
@@ -1141,12 +1141,14 @@
                
                private void DrawSelectionAndFocus(TreeNode node, Graphics dc, 
Rectangle r)
                {
+                       if (Focused && focused_node == node) {
+                               ControlPaint.DrawFocusRectangle (dc, r, 
ForeColor, BackColor);
+                       }
+                       r.Inflate(-1, -1);
                        if ((!HideSelection || Focused) && SelectedNode == node)
                                dc.FillRectangle 
(ThemeEngine.Current.ResPool.GetSolidBrush 
(ThemeEngine.Current.ColorHighlight), r);
                        else
                                dc.FillRectangle 
(ThemeEngine.Current.ResPool.GetSolidBrush (node.BackColor), r);
-                       if (Focused && focused_node == node)
-                               ControlPaint.DrawFocusRectangle (dc, r, 
ForeColor, BackColor);
                }
                 
                private void DrawStaticNode (TreeNode node, Graphics dc)

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

Reply via email to