diff options
author | Marc Englund <marc.englund@itmill.com> | 2008-09-26 11:35:34 +0000 |
---|---|---|
committer | Marc Englund <marc.englund@itmill.com> | 2008-09-26 11:35:34 +0000 |
commit | ac564d08c08bf7b1399e9a38dc1679211cb8fb2c (patch) | |
tree | 307d64db605b01b368fbead62f14949a3edeebc4 | |
parent | 1eb8a7ee03b342087efccd9217e75bbced40d67d (diff) | |
download | vaadin-framework-ac564d08c08bf7b1399e9a38dc1679211cb8fb2c.tar.gz vaadin-framework-ac564d08c08bf7b1399e9a38dc1679211cb8fb2c.zip |
Fixes #2051 (components fit table better)
svn changeset:5526/svn branch:trunk
-rw-r--r-- | WebContent/ITMILL/themes/default/styles.css | 11 | ||||
-rw-r--r-- | WebContent/ITMILL/themes/default/table/table.css | 11 | ||||
-rw-r--r-- | src/com/itmill/toolkit/tests/tickets/Ticket2098.java | 13 |
3 files changed, 20 insertions, 15 deletions
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);
}
}
|