Browse Source

Hide log by setting width/height to 0 so that the same spacing is used

as in Vaadin 6 (to ease screenshot migration)
tags/7.0.0.alpha2
Artur Signell 12 years ago
parent
commit
08987be4c2

+ 4
- 0
WebContent/VAADIN/themes/base/common/common.css View File

@@ -239,4 +239,8 @@ div.v-app-loading {
opacity: 0.5;
filter: alpha(opacity=50);
cursor: default;
}

.v-clip {
overflow: hidden;
}

+ 13
- 1
tests/testbench/com/vaadin/tests/components/AbstractComponentTest.java View 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);
}


Loading…
Cancel
Save