From: Jouni Koivuviita Date: Thu, 8 May 2008 08:26:48 +0000 (+0000) Subject: Table editmode: textfield height now the same as plain string height -> switching... X-Git-Tag: 6.7.0.beta1~4804 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=57393cbba53218de08016c99bd76b9bb1553da31;p=vaadin-framework.git Table editmode: textfield height now the same as plain string height -> switching between modes preserves scroll position. Table column spacing increased for legibility. svn changeset:4385/svn branch:trunk --- diff --git a/WebContent/ITMILL/themes/default/table/table.css b/WebContent/ITMILL/themes/default/table/table.css index 1a56c6c992..cc94d4ed6b 100644 --- a/WebContent/ITMILL/themes/default/table/table.css +++ b/WebContent/ITMILL/themes/default/table/table.css @@ -101,12 +101,20 @@ } .i-table-row td, .i-table-row-odd td { - padding: 3px 0; + padding: 0; } .i-table-cell-content { white-space: nowrap; overflow: hidden; - padding-left: 3px; + padding: 3px 5px 3px 3px; + height: 18px; +} + +/* Fix textfield size to correspond label size in */ +.i-table-cell-content .i-textfield { + height: auto; + margin: -2px 0 -3px -3px; + width: 97%; /* approximate */ } diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java index 180a8f743d..ae0266cd1f 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IScrollTable.java @@ -1567,7 +1567,12 @@ public class IScrollTable extends Composite implements Table, ScrollListener, public static final int DEFAULT_ROW_HEIGHT = 24; - public static final int CELL_CONTENT_PADDING = 3; + /** + * Amount of padding inside one table cell (this is reduced from the + * "cellContent" element's width). You may override this in your own + * widgetset. + */ + public static final int CELL_CONTENT_PADDING = 8; private int rowHeight = -1;