From: Jouni Koivuviita Date: Mon, 26 Nov 2007 10:04:18 +0000 (+0000) Subject: -Small fix for ITabsheet height calculations. X-Git-Tag: 6.7.0.beta1~5469 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d8a64b0f6f39789acf5ab53f920d72cfcceec7a2;p=vaadin-framework.git -Small fix for ITabsheet height calculations. -Small fix for ITextField style dependant names. -Clean up for panel.css. -Refactored small parts of textfield.css. svn changeset:2948/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/ITabsheet.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/ITabsheet.java index 6eb352b38a..5c775f7d45 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/ITabsheet.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/ITabsheet.java @@ -253,7 +253,8 @@ public class ITabsheet extends FlowPanel implements Paintable, // Calculate used height super.setHeight(""); int usedHeight = DOM.getElementPropertyInt(deco, "offsetTop") - + DOM.getElementPropertyInt(deco, "offsetHeight"); + + DOM.getElementPropertyInt(deco, "offsetHeight") + - DOM.getElementPropertyInt(getElement(), "offsetTop"); // Calculate content area height (don't allow negative values) int h = targetHeight - usedHeight; diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextField.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextField.java index 6b77aefebd..3195954ffc 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextField.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/ITextField.java @@ -27,7 +27,7 @@ public class ITextField extends TextBoxBase implements Paintable, /** * This CSS classname is added to the input node on hover. */ - public static final String CLASSNAME_FOCUS = "i-textfield-focus"; + public static final String CLASSNAME_FOCUS = "focus"; protected String id; @@ -71,11 +71,11 @@ public class ITextField extends TextBoxBase implements Paintable, } public void onFocus(Widget sender) { - addStyleName(CLASSNAME_FOCUS); + addStyleDependentName(CLASSNAME_FOCUS); } public void onLostFocus(Widget sender) { - removeStyleName(CLASSNAME_FOCUS); + removeStyleDependentName(CLASSNAME_FOCUS); } public void setColumns(int columns) { diff --git a/src/com/itmill/toolkit/terminal/gwt/public/default/panel/panel.css b/src/com/itmill/toolkit/terminal/gwt/public/default/panel/panel.css index a07c4670ba..2182009fa8 100644 --- a/src/com/itmill/toolkit/terminal/gwt/public/default/panel/panel.css +++ b/src/com/itmill/toolkit/terminal/gwt/public/default/panel/panel.css @@ -3,9 +3,9 @@ .i-panel-content, .i-panel-deco, .i-panel-light, -.i-panel-light-caption, -.i-panel-light-content, -.i-panel-light-deco { +.i-panel-caption-light, +.i-panel-content-light, +.i-panel-deco-light { outline: none; /* Prevent selection outline which might break layouts or cause scrollbars */ } @@ -18,7 +18,7 @@ } .i-panel-caption, -.i-panel-light-caption { +.i-panel-caption-light { font-size: 18px; line-height: 18px; font-weight: normal; @@ -32,10 +32,6 @@ background: #fff; } -.i-panel-light-caption { - overflow: hidden; -} - .i-panel-nocaption { height: 9px; border-bottom: 1px solid #dee2e3; @@ -102,6 +98,13 @@ display: none; } +.i-panel-nocaption-light { + height: 1px; + background: #babfc0; + overflow: hidden; + border: none; +} + .i-panel-content-light { border: none; background: transparent; @@ -131,7 +134,8 @@ /* IE specific rules (different selectors for IE6 and IE7. * These selectors must be separate because IE6 won't - * apply them if they are grouped together. + * apply them if they are grouped together + * (it doesn't recognize the '+' selector). */ * html .i-panel-caption { border: 1px solid #babfc0; diff --git a/src/com/itmill/toolkit/terminal/gwt/public/default/textfield/textfield.css b/src/com/itmill/toolkit/terminal/gwt/public/default/textfield/textfield.css index b8d4003e65..f567b537c9 100644 --- a/src/com/itmill/toolkit/terminal/gwt/public/default/textfield/textfield.css +++ b/src/com/itmill/toolkit/terminal/gwt/public/default/textfield/textfield.css @@ -1,49 +1,51 @@ -.i-textfield { - background: #fff url(img/bg.png) repeat-x; - padding: 2px; - border: 1px solid #b6b6b6; - border-top-color: #9d9d9d; - border-bottom-color: #d6d6d6; - border-right-color: #d6d6d6; - margin: 0; - font-size: 13px; - height: 18px; -} - -.i-textfield-focus { - border-color: #5daee8; -} - -.i-textfield-error { - background: #ff9999; -} - -.i-textfield.i-readonly { - background: transparent; - color: #222; - border: none; -} - -/* TODO impl all textarea styles */ -.i-textarea { - background: #fff url(img/bg.png) repeat-x; - padding: 2px; - border: 1px solid #b6b6b6; - border-top-color: #9d9d9d; - border-bottom-color: #d6d6d6; - border-right-color: #d6d6d6; - margin: 0; - font-size: 13px; -} - - -.i-richtextarea { - border: 1px solid #b6b6b6; - overflow: hidden; -} -.i-richtextarea .gwt-RichTextArea { - background: #fff url(img/bg.png) repeat-x; -} -.i-richtextarea iframe { - border: 0; +.i-textfield { + background: #fff url(img/bg.png) repeat-x; + padding: 2px; + border: 1px solid #b6b6b6; + border-top-color: #9d9d9d; + border-bottom-color: #d6d6d6; + border-right-color: #d6d6d6; + margin: 0; + font-size: 13px; + height: 18px; +} + +.i-textarea { + background: #fff url(img/bg.png) repeat-x; + padding: 2px; + border: 1px solid #b6b6b6; + border-top-color: #9d9d9d; + border-bottom-color: #d6d6d6; + border-right-color: #d6d6d6; + margin: 0; + font-size: 13px; +} + +.i-textfield-focus, +.i-textarea-focus { + border-color: #5daee8; +} + +.i-textfield-error, +.i-textarea-error { + background: #ff9999; +} + +.i-textfield.i-readonly, +.i-textarea.i-readonly { + background: transparent; + color: #222; + border: none; +} + + +.i-richtextarea { + border: 1px solid #b6b6b6; + overflow: hidden; +} +.i-richtextarea .gwt-RichTextArea { + background: #fff url(img/bg.png) repeat-x; +} +.i-richtextarea iframe { + border: 0; } \ No newline at end of file