Author: jpobst
Date: 2007-10-01 17:58:50 -0400 (Mon, 01 Oct 2007)
New Revision: 86726
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
Log:
2007-10-01 Jonathan Pobst <[EMAIL PROTECTED]>
* TextControl.cs: Change the margins to match MS a little better.
Still not perfect for X11 due to some DrawString differences, but
is still an improvement over the old stuff.
Partially fixes #324467.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-10-01 21:00:51 UTC (rev 86725)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-10-01 21:58:50 UTC (rev 86726)
@@ -1,3 +1,10 @@
+2007-10-01 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * TextControl.cs: Change the margins to match MS a little better.
+ Still not perfect for X11 due to some DrawString differences, but
+ is still an improvement over the old stuff.
+ Partially fixes #324467.
+
2007-09-30 Carlos Alberto Cortez <[EMAIL PROTECTED]>
* FolderBrowserDialog.cs: When using MyComputer as
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
2007-10-01 21:00:51 UTC (rev 86725)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
2007-10-01 21:58:50 UTC (rev 86726)
@@ -1082,14 +1082,22 @@
internal void UpdateMargins ()
{
- if (owner.actual_border_style ==
BorderStyle.FixedSingle) {
- left_margin = 0;
- top_margin = 0;
- right_margin = 0;
- } else {
- left_margin = 2;
- top_margin = 2;
- right_margin = 2;
+ switch (owner.actual_border_style) {
+ case BorderStyle.None:
+ left_margin = 0;
+ top_margin = 0;
+ right_margin = 1;
+ break;
+ case BorderStyle.FixedSingle:
+ left_margin = 2;
+ top_margin = 2;
+ right_margin = 3;
+ break;
+ case BorderStyle.Fixed3D:
+ left_margin = 1;
+ top_margin = 1;
+ right_margin = 2;
+ break;
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches