Author: jpobst
Date: 2007-02-23 09:56:40 -0500 (Fri, 23 Feb 2007)
New Revision: 73366
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextRenderer.cs
Log:
2007-02-23 Jonathan Pobst <[EMAIL PROTECTED]>
* TextRenderer.cs: Don't add padding on MeasureText if we were
sent the NoPadding flag.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-02-23 14:37:46 UTC (rev 73365)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-02-23 14:56:40 UTC (rev 73366)
@@ -1,3 +1,8 @@
+2007-02-23 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * TextRenderer.cs: Don't add padding on MeasureText if we were
+ sent the NoPadding flag.
+
2007-02-23 Everaldo Canuto <[EMAIL PROTECTED]>
* ThemeWin32Classic.cs: Invert order of drawing operation with DrawImage
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextRenderer.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextRenderer.cs
2007-02-23 14:37:46 UTC (rev 73365)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextRenderer.cs
2007-02-23 14:56:40 UTC (rev 73366)
@@ -215,7 +215,7 @@
// just makes something up as well. This will
require lots of tweaking to match MS. :(
Size retval = r.ToRectangle ().Size;
- if (retval.Width > 0) {
+ if (retval.Width > 0 && (flags &
TextFormatFlags.NoPadding) == TextFormatFlags.NoPadding) {
retval.Width += 6;
retval.Width += (int)retval.Height / 8;
}
@@ -227,8 +227,8 @@
Size retval = g.MeasureString (text,
font).ToSize ();
- if (retval.Width > 0)
- retval.Width += 6;
+ if (retval.Width > 0 && (flags &
TextFormatFlags.NoPadding) == TextFormatFlags.NoPadding)
+ retval.Width += 9;
return retval;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches