Author: jackson
Date: 2005-10-10 12:58:26 -0400 (Mon, 10 Oct 2005)
New Revision: 51525
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: Don't adjust the rect given to DrawString now that
our libgdiplus draws correctly.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-10-10 16:51:40 UTC (rev 51524)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-10-10 16:58:26 UTC (rev 51525)
@@ -1,3 +1,8 @@
+2005-10-10 Jackson Harper <[EMAIL PROTECTED]>
+
+ * TreeView.cs: Don't adjust the rect given to DrawString now that
+ our libgdiplus draws correctly.
+
2005-10-08 Jackson Harper <[EMAIL PROTECTED]>
* TreeView.cs: Don't try to find the clicked on node if there are
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
2005-10-10 16:51:40 UTC (rev 51524)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs
2005-10-10 16:58:26 UTC (rev 51525)
@@ -1056,15 +1056,12 @@
private void DrawStaticNode (TreeNode node, Graphics dc)
{
- Rectangle r = node.Bounds;
StringFormat format = new StringFormat ();
format.LineAlignment = StringAlignment.Center;
- r.Y += 2; // we have to adjust this to get nice middle
alignment
if (!full_row_select)
- DrawSelectionAndFocus(node, dc, r);
- r.X += 4;
- r.Width -= 8;
+ DrawSelectionAndFocus(node, dc, node.Bounds);
+
Font font = node.NodeFont;
if (node.NodeFont == null)
font = Font;
@@ -1072,7 +1069,7 @@
ThemeEngine.Current.ColorHighlightText
: node.ForeColor);
dc.DrawString (node.Text, font,
ThemeEngine.Current.ResPool.GetSolidBrush (text_color),
- r, format);
+ node.Bounds, format);
}
private void DrawNode (TreeNode node, Graphics dc, Rectangle
clip, ref int depth, int item_height, int max_height)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches