]> source.dussan.org Git - vaadin-framework.git/commitdiff
-Small fix for ITabsheet height calculations.
authorJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 26 Nov 2007 10:04:18 +0000 (10:04 +0000)
committerJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 26 Nov 2007 10:04:18 +0000 (10:04 +0000)
-Small fix for ITextField style dependant names.
-Clean up for panel.css.
-Refactored small parts of textfield.css.

svn changeset:2948/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/ITabsheet.java
src/com/itmill/toolkit/terminal/gwt/client/ui/ITextField.java
src/com/itmill/toolkit/terminal/gwt/public/default/panel/panel.css
src/com/itmill/toolkit/terminal/gwt/public/default/textfield/textfield.css

index 6eb352b38aef33e084128812bdbae52006e3aebb..5c775f7d4541fc29a2cf8d48da9fbf9442545059 100644 (file)
@@ -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;
index 6b77aefebdc45856b8eeabf1554cf1dea15ac814..3195954ffcf82e5a3666abddac21bb6ee95e67de 100644 (file)
@@ -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) {
index a07c4670bac2a533295da4b03715cfe6a7611256..2182009fa80b5e8db7da1779fc67ba19ee9092f0 100644 (file)
@@ -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;
        background: #fff;
 }
 
-.i-panel-light-caption {
-       overflow: hidden;
-}
-
 .i-panel-nocaption {
        height: 9px;
        border-bottom: 1px solid #dee2e3;
        display: none;
 }
 
+.i-panel-nocaption-light {
+       height: 1px;
+       background: #babfc0;
+       overflow: hidden;
+       border: none;
+}
+
 .i-panel-content-light {
        border: none;
        background: transparent;
 
 /* 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;
index b8d4003e6533a7b220ec4e8b3c7be78fdb6f8818..f567b537c915164a0a253e6407832485fa40da3e 100644 (file)
@@ -1,49 +1,51 @@
-.i-textfield {\r
-       background: #fff url(img/bg.png) repeat-x;\r
-       padding: 2px;\r
-       border: 1px solid #b6b6b6;\r
-       border-top-color: #9d9d9d;\r
-       border-bottom-color: #d6d6d6;\r
-       border-right-color: #d6d6d6;\r
-       margin: 0;\r
-       font-size: 13px;\r
-       height: 18px;\r
-}\r
-\r
-.i-textfield-focus {\r
-       border-color: #5daee8;\r
-}\r
-\r
-.i-textfield-error {\r
-       background: #ff9999;\r
-}\r
-\r
-.i-textfield.i-readonly {\r
-       background: transparent;\r
-       color: #222;\r
-       border: none;\r
-}\r
-\r
-/* TODO impl all textarea styles */\r
-.i-textarea {\r
-       background: #fff url(img/bg.png) repeat-x;\r
-       padding: 2px;\r
-       border: 1px solid #b6b6b6;\r
-       border-top-color: #9d9d9d;\r
-       border-bottom-color: #d6d6d6;\r
-       border-right-color: #d6d6d6;\r
-       margin: 0;\r
-       font-size: 13px;\r
-}\r
-\r
-\r
-.i-richtextarea {\r
-       border: 1px solid #b6b6b6;\r
-       overflow: hidden;\r
-}\r
-.i-richtextarea .gwt-RichTextArea {\r
-       background: #fff url(img/bg.png) repeat-x;\r
-}\r
-.i-richtextarea iframe {\r
-       border: 0;\r
+.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