Parcourir la source

* TextControl.cs: Lower magic number for wrap calculations. This
lets text get closer to the right (far) edge.


svn path=/trunk/mcs/; revision=68759

Jackson Harper il y a 19 ans
Parent
commit
e0c219d452

+ 2 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -2,6 +2,8 @@
 
 	* TextBoxBase.cs: You can still change the selected text on a read
 	only textbox.
+	* TextControl.cs: Lower magic number for wrap calculations. This
+	lets text get closer to the right (far) edge.
 
 2006-11-30  Jonathan Pobst  <[email protected]>
 

+ 1 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs

@@ -472,7 +472,7 @@ namespace System.Windows.Forms {
 				}
 
 				if (doc.wrap) {
-					if ((wrap_pos > 0) && (wrap_pos != len) && (widths[pos] + w) + 27 > (doc.viewport_width - this.right_indent)) {
+					if ((wrap_pos > 0) && (wrap_pos != len) && (widths[pos] + w) + 5 > (doc.viewport_width - this.right_indent)) {
 						pos = wrap_pos;
 						tag.width = wrap_width;
 						doc.Split(this, tag, pos, this.soft_break);