From: Marc Englund Date: Fri, 26 Sep 2008 11:35:34 +0000 (+0000) Subject: Fixes #2051 (components fit table better) X-Git-Tag: 6.7.0.beta1~4080 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ac564d08c08bf7b1399e9a38dc1679211cb8fb2c;p=vaadin-framework.git Fixes #2051 (components fit table better) svn changeset:5526/svn branch:trunk --- diff --git a/WebContent/ITMILL/themes/default/styles.css b/WebContent/ITMILL/themes/default/styles.css index 658d3d7bcb..64e0b0bf6d 100644 --- a/WebContent/ITMILL/themes/default/styles.css +++ b/WebContent/ITMILL/themes/default/styles.css @@ -1747,16 +1747,19 @@ input.i-modified, overflow: hidden; padding: 3px 0 3px 3px; margin-right: 5px; - height: 18px; + line-height: 23px; } /* Fix textfield size to correspond label size inside table */ +.i-table-cell-content input.i-textfield, +.i-table-cell-content .i-button { + margin: -2px 0 -2px -3px; +} .i-table-cell-content .i-textfield, .i-table-cell-content .i-datefield { - height: auto; - margin: -2px 0 -3px -3px; width: 97%; /* approximate */ } + /* ...but not for datefield textarea */ .i-table-cell-content .i-datefield .i-textfield { width: auto; @@ -1764,7 +1767,7 @@ input.i-modified, } /* datefield button is too high for table cell */ .i-table-cell-content .i-datefield-button { - height: 20px; + height: 25px; } diff --git a/WebContent/ITMILL/themes/default/table/table.css b/WebContent/ITMILL/themes/default/table/table.css index 9b3d2637c9..4283fa7ddc 100644 --- a/WebContent/ITMILL/themes/default/table/table.css +++ b/WebContent/ITMILL/themes/default/table/table.css @@ -108,16 +108,19 @@ overflow: hidden; padding: 3px 0 3px 3px; margin-right: 5px; - height: 18px; + line-height: 23px; } /* Fix textfield size to correspond label size inside table */ +.i-table-cell-content input.i-textfield, +.i-table-cell-content .i-button { + margin: -2px 0 -2px -3px; +} .i-table-cell-content .i-textfield, .i-table-cell-content .i-datefield { - height: auto; - margin: -2px 0 -3px -3px; width: 97%; /* approximate */ } + /* ...but not for datefield textarea */ .i-table-cell-content .i-datefield .i-textfield { width: auto; @@ -125,7 +128,7 @@ } /* datefield button is too high for table cell */ .i-table-cell-content .i-datefield-button { - height: 20px; + height: 25px; } diff --git a/src/com/itmill/toolkit/tests/tickets/Ticket2098.java b/src/com/itmill/toolkit/tests/tickets/Ticket2098.java index 6b272ed229..ec19fecd04 100644 --- a/src/com/itmill/toolkit/tests/tickets/Ticket2098.java +++ b/src/com/itmill/toolkit/tests/tickets/Ticket2098.java @@ -1,23 +1,23 @@ package com.itmill.toolkit.tests.tickets; import com.itmill.toolkit.Application; -import com.itmill.toolkit.ui.GridLayout; import com.itmill.toolkit.ui.Label; import com.itmill.toolkit.ui.TabSheet; import com.itmill.toolkit.ui.Window; public class Ticket2098 extends Application { + private static final String info = "First tab hidden, second should initially be selected"; + public void init() { Window w = new Window(getClass().getSimpleName()); setMainWindow(w); // setTheme("tests-tickets"); - GridLayout layout = new GridLayout(10, 10); - w.setLayout(layout); - createUI(layout); + w.addComponent(new Label(info)); + createUI(w); } - private void createUI(GridLayout layout) { + private void createUI(Window w) { TabSheet ts = new TabSheet(); Label l1 = new Label("111"); Label l2 = new Label("222"); @@ -30,8 +30,7 @@ public class Ticket2098 extends Application { ts.addTab(l4, "4", null); l1.setVisible(false); - ts.setSelectedTab(l3); - layout.addComponent(ts); + w.addComponent(ts); } }