You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2007/07/13 10:16:37 UTC

svn commit: r555906 - /myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java

Author: lofwyr
Date: Fri Jul 13 01:16:36 2007
New Revision: 555906

URL: http://svn.apache.org/viewvc?view=rev&rev=555906
Log:
TOBAGO-446: tc:box renders the left margin and the right margin addional on the right side of the cells.

Modified:
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java?view=diff&rev=555906&r1=555905&r2=555906
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java Fri Jul 13 01:16:36 2007
@@ -833,12 +833,22 @@
       }
       if(marginRight > 0) {
         style.put("margin-right", marginRight);
+        Integer width = style.getInt("width");
+        if (width != null) {
+          width -= marginRight;
+          style.put("width", width);
+        }
       }
       if(marginBottom > 0) {
         style.put("margin-bottom", marginBottom);
       }
       if(marginLeft > 0) {
         style.put("margin-left", marginLeft);
+        Integer width = style.getInt("width");
+        if (width != null) {
+          width -= marginLeft;
+          style.put("width", width);
+        }
       }
 
       //layout.getAttributes().put(ATTR_LAYOUT_TABLE_STYLE, style);