]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes #2051 (components fit table better)
authorMarc Englund <marc.englund@itmill.com>
Fri, 26 Sep 2008 11:35:34 +0000 (11:35 +0000)
committerMarc Englund <marc.englund@itmill.com>
Fri, 26 Sep 2008 11:35:34 +0000 (11:35 +0000)
svn changeset:5526/svn branch:trunk

WebContent/ITMILL/themes/default/styles.css
WebContent/ITMILL/themes/default/table/table.css
src/com/itmill/toolkit/tests/tickets/Ticket2098.java

index 658d3d7bcb1f3808b1443353c19fdd5311c6f811..64e0b0bf6d96c057d79e0b4e1127ea21da81a970 100644 (file)
@@ -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;
 }
 
 
index 9b3d2637c9870e15f89e9d89f2f35ab8c1447681..4283fa7ddcb20e08508b5590f12e90e22cab518b 100644 (file)
        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;
 }
 /* datefield button is too high for table cell */
 .i-table-cell-content .i-datefield-button {
-       height: 20px;
+       height: 25px;
 }
 
 
index 6b272ed2293e25d7e01877fbb26ebda6073442e7..ec19fecd04874a505d66da55196b1fc2a372bbe1 100644 (file)
@@ -1,23 +1,23 @@
 package com.itmill.toolkit.tests.tickets;\r
 \r
 import com.itmill.toolkit.Application;\r
-import com.itmill.toolkit.ui.GridLayout;\r
 import com.itmill.toolkit.ui.Label;\r
 import com.itmill.toolkit.ui.TabSheet;\r
 import com.itmill.toolkit.ui.Window;\r
 \r
 public class Ticket2098 extends Application {\r
 \r
+    private static final String info = "First tab hidden, second should initially be selected";\r
+\r
     public void init() {\r
         Window w = new Window(getClass().getSimpleName());\r
         setMainWindow(w);\r
         // setTheme("tests-tickets");\r
-        GridLayout layout = new GridLayout(10, 10);\r
-        w.setLayout(layout);\r
-        createUI(layout);\r
+        w.addComponent(new Label(info));\r
+        createUI(w);\r
     }\r
 \r
-    private void createUI(GridLayout layout) {\r
+    private void createUI(Window w) {\r
         TabSheet ts = new TabSheet();\r
         Label l1 = new Label("111");\r
         Label l2 = new Label("222");\r
@@ -30,8 +30,7 @@ public class Ticket2098 extends Application {
         ts.addTab(l4, "4", null);\r
 \r
         l1.setVisible(false);\r
-        ts.setSelectedTab(l3);\r
 \r
-        layout.addComponent(ts);\r
+        w.addComponent(ts);\r
     }\r
 }\r