You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by no...@apache.org on 2010/07/02 09:49:51 UTC

svn commit: r959899 - /pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java

Author: noelgrandin
Date: Fri Jul  2 07:49:51 2010
New Revision: 959899

URL: http://svn.apache.org/viewvc?rev=959899&view=rev
Log:
fix bug in layout with wrapText==false and bold text

Modified:
    pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java?rev=959899&r1=959898&r2=959899&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java Fri Jul  2 07:49:51 2010
@@ -1916,7 +1916,13 @@ public class TextAreaSkin extends Contai
             TextArea textArea = (TextArea)getComponent();
             int width = getWidth();
 
-            documentView.setBreakWidth(Math.max(width - (margin.left + margin.right), 0));
+            int breakWidth;
+            if (wrapText) {
+                breakWidth = Math.max(width - (margin.left + margin.right), 0);
+            } else {
+                breakWidth = Integer.MAX_VALUE;
+            }
+            documentView.setBreakWidth(breakWidth);
             documentView.validate();
             documentView.setSkinLocation(margin.left, margin.top);