]> source.dussan.org Git - vaadin-framework.git/commitdiff
Panel styles now work without captions as well. Default font size increased to 11px...
authorJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 18 Jun 2007 08:22:20 +0000 (08:22 +0000)
committerJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 18 Jun 2007 08:22:20 +0000 (08:22 +0000)
svn changeset:1758/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IPanel.java
src/com/itmill/toolkit/terminal/gwt/public/component-themes/common/css/common.css
src/com/itmill/toolkit/terminal/gwt/public/component-themes/panel/css/panel.css
src/com/itmill/toolkit/terminal/gwt/public/component-themes/textfield/css/textfield.css

index 4f323efcc2b82fb811d3aa786b9590f1aa9880ab..1207676b2a37c90f9d4335b06834a300d049db73 100644 (file)
@@ -32,18 +32,21 @@ public class IPanel extends FlowPanel implements Paintable {
                this.client = client;
                this.id = uidl.getId();
                
-               if(uidl.hasAttribute("caption"))
-                       caption.setText(uidl.getStringAttribute("caption"));
-               else
-                       caption.setText("");
+               clear();
                
                if(uidl.hasAttribute("style"))
                        setStyleName(CLASSNAME + " " + CLASSNAME+"-"+uidl.getStringAttribute("style"));
                else
                        setStyleName(CLASSNAME);
                
-               clear();
-               add(caption);
+               // Handle caption displaying
+               if(uidl.hasAttribute("caption") && !uidl.getStringAttribute("caption").equals("")) {
+                       caption.setText(uidl.getStringAttribute("caption"));
+                       add(caption);
+               } else if(uidl.hasAttribute("style")) {
+                               // Theme needs this to work around different paddings
+                               addStyleName(CLASSNAME+"-nocaption");
+               }
                
                UIDL layoutUidl = uidl.getChildUIDL(0);
                Widget layout = client.getWidget(layoutUidl);
index 5d8424dca9e1e91203d1ce7f3ae1e11f60d16dfa..f5bb1096ec714b8c97ac4122ed98fea96b7def7e 100644 (file)
@@ -2,13 +2,13 @@ body {
        background: #fafafc url(../img/window-bg.png) repeat-x;\r
        font-family: helvetica, verdana, tahoma, arial, sans-serif;\r
        color: #222;\r
-       font-size: 62.5%;\r
+       font-size: 68.75%;\r
        line-height: 1.4em;\r
 }\r
 \r
 input, select, textarea, button {\r
        font-family: helvetica, verdana, tahoma, arial, sans-serif;\r
-       font-size: 1.1em;\r
+       font-size: 1em;\r
 }\r
 \r
 select {\r
index 286a3746cc908f79f526d723286f89607760bd86..b42af09d321f950b01549de8546b1823e27fd4ab 100644 (file)
@@ -11,7 +11,7 @@
        overflow: hidden;\r
        background: transparent url(../img/top-right.png) no-repeat right top;\r
        content: url(../img/top-left.png);\r
-       margin: -6px -6px 0 -6px;\r
+       margin: -6px -6px 3px -6px;\r
 }\r
 \r
 .i-panel:after {\r
 }\r
 \r
 .i-panel-caption {\r
-       font-size: 1.2em;\r
+       font-size: 1.1em;\r
        font-weight: bold;\r
        color: #1c3e6e;\r
-       margin: 3px 0 5px 0;\r
+       margin: 0 0 7px 0;\r
 }\r
 \r
 \r
 \r
 .i-panel-strong .i-panel-caption {\r
        color: #fff;\r
-       margin: -22px 0 12px 0;\r
+       margin: -25px 0 12px 0;\r
        white-space: nowrap;\r
 }\r
 \r
+/* Strong style without caption */\r
+.i-panel-strong.i-panel-nocaption {\r
+       background-image: url(../img/top-bg.png);\r
+}\r
+.i-panel-strong.i-panel-nocaption:before {\r
+       height: 7px;\r
+       background-image: url(../img/top-right.png);\r
+       content: url(../img/top-left.png);\r
+}\r
 \r
 \r
 /* Light style */\r
@@ -56,7 +65,7 @@
        background-image: url(../img/top-bg-light.png);\r
        border-color: #b3c2d6;\r
        border-top-color: #2667a2;\r
-       margin-top: 23px;\r
+       margin-top: 20px;\r
 }\r
 \r
 .i-panel-light:before {\r
 }\r
 \r
 .i-panel-light .i-panel-caption {\r
-       margin: -23px -5px 18px -5px;\r
-       font-size: 1.1em;\r
+       margin: -26px -5px 18px -5px;\r
+       font-size: 1em;\r
        white-space: nowrap;\r
 }\r
 \r
+/* Light style without caption */\r
+.i-panel-light.i-panel-nocaption {\r
+       margin-top: 5px;\r
+}\r
+\r
 \r
 \r
 \r
        background-position: 0 1px;\r
 }\r
 \r
+* html .i-panel .i-panel-caption,\r
+*+html .i-panel .i-panel-caption {\r
+       margin-top: 3px;\r
+}\r
+\r
 * html .i-panel-strong .i-panel-caption,\r
 *+html .i-panel-strong .i-panel-caption {\r
        margin: 1px 0 10px 0;\r
 \r
 * html .i-panel-light .i-panel-caption,\r
 *+html .i-panel-light .i-panel-caption {\r
+       margin-top: -23px;\r
        margin-bottom: 0;\r
        padding-bottom: 23px; /* Must specify enough space because of wierd clipping bug */\r
 }
\ No newline at end of file
index 45f2b8dde31d9772a50094703d0d1e6b13ebef3e..84ef27e2f37782bd761adf3d5e7f4a2cb71edcd2 100644 (file)
@@ -1,5 +1,5 @@
 .i-textfield{\r
-       font-size: 1.2em;\r
+       font-size: 1.1em;\r
        color: #444;\r
        background: #fff url(../img/bg.png) repeat-x;\r
        padding: 2px;\r