]> source.dussan.org Git - vaadin-framework.git/commitdiff
Hide log by setting width/height to 0 so that the same spacing is used
authorArtur Signell <artur@vaadin.com>
Wed, 21 Mar 2012 12:10:33 +0000 (14:10 +0200)
committerArtur Signell <artur@vaadin.com>
Wed, 21 Mar 2012 13:28:15 +0000 (15:28 +0200)
as in Vaadin 6 (to ease screenshot migration)

WebContent/VAADIN/themes/base/common/common.css
tests/testbench/com/vaadin/tests/components/AbstractComponentTest.java

index a95f33afcd518368d85777b59914eb5181c20dc0..6de2b262676ba4e69feddcfd3901cba31df4119a 100644 (file)
@@ -239,4 +239,8 @@ div.v-app-loading {
     opacity: 0.5;
     filter: alpha(opacity=50);
     cursor: default;
+}
+
+.v-clip {
+       overflow: hidden;
 }
\ No newline at end of file
index e8ac2130492416bc0ce9a114207c5fdf75bd0549..5934cf19d0cdad223dfea67434b97ce17b958109 100644 (file)
@@ -157,11 +157,23 @@ public abstract class AbstractComponentTest<T extends AbstractComponent>
     }
 
     protected void setLogVisible(boolean visible) {
-        log.setVisible(visible);
+        // This is only to be screenshot-compatible with Vaadin 6, where
+        // invisible components cause spacing
+        if (visible) {
+            log.setHeight(null);
+            log.setWidth(null);
+            log.setCaption((String) log.getData());
+        } else {
+            log.setHeight("0px");
+            log.setWidth("0px");
+            log.setCaption(null);
+        }
     }
 
     private void createLog() {
         log = new Log(5).setNumberLogRows(true);
+        log.setData(log.getCaption());
+        log.setStyleName("v-clip");
         getLayout().addComponent(log, 1);
     }