Author: jackson
Date: 2005-05-03 10:49:18 -0400 (Tue, 03 May 2005)
New Revision: 43931

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
Log:
        * TreeView.cs: Use dashed lines to connect nodes. Use the
        ControlPaint method for drawing the focus rect instead of doing
        that in treeview.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-05-03 14:16:37 UTC (rev 43930)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-05-03 14:49:18 UTC (rev 43931)
@@ -1,3 +1,9 @@
+2005-05-03  Jackson Harper  <[EMAIL PROTECTED]>
+
+       * TreeView.cs: Use dashed lines to connect nodes. Use the
+       ControlPaint method for drawing the focus rect instead of doing
+       that in treeview.
+
 2005-05-02  Peter Bartok  <[EMAIL PROTECTED]>
 
        * LinkLabel.cs: Fixed the fixes from r43566 and 43521

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2005-05-03 14:16:37 UTC (rev 43930)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs      
2005-05-03 14:49:18 UTC (rev 43931)
@@ -118,6 +118,7 @@
                        SetStyle (ControlStyles.UserPaint | 
ControlStyles.Selectable, true);
 
                        dash = new Pen (SystemColors.ControlLight, 1);
+                       dash.DashStyle = DashStyle.Dash;
                }
 
                #endregion      // Public Constructors
@@ -957,16 +958,11 @@
                                if (Focused) {
                                        if (SelectedNode == node)
                                                dc.FillRectangle 
(ThemeEngine.Current.ResPool.GetSolidBrush (ThemeEngine.Current.ColorHilight), 
r);
-                                       if (focused_node == node) {
-                                               Pen dot_pen = new Pen 
(ThemeEngine.Current.ColorButtonHilight, 1);
-                                               dot_pen.DashStyle = 
DashStyle.Dot;
-                                               dc.DrawRectangle (new Pen 
(ThemeEngine.Current.ColorButtonDkShadow),
-                                                               node.Bounds.X, 
node.Bounds.Y, node.Bounds.Width - 1, node.Bounds.Height - 1);
-                                               dc.DrawRectangle (dot_pen, 
node.Bounds.X, node.Bounds.Y, node.Bounds.Width - 1, node.Bounds.Height - 1);
-                                       }
+                                       if (focused_node == node)
+                                                
ControlPaint.DrawFocusRectangle (dc, r, ForeColor, BackColor);
                                } else {
                                        if (!HideSelection && SelectedNode == 
node)
-                                               dc.FillRectangle 
(ThemeEngine.Current.ResPool.GetSolidBrush 
(ThemeEngine.Current.ColorButtonFace), node.Bounds);
+                                               dc.FillRectangle 
(ThemeEngine.Current.ResPool.GetSolidBrush 
(ThemeEngine.Current.ColorButtonFace), r);
                                }
                                dc.DrawString (node.Text, font, 
ThemeEngine.Current.ResPool.GetSolidBrush (text_color), r, format);
                                y += item_height + 1;

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

Reply via email to