]> source.dussan.org Git - vaadin-framework.git/commitdiff
More for #959 (tab scrolling)
authorMarc Englund <marc.englund@itmill.com>
Tue, 3 Jun 2008 13:48:31 +0000 (13:48 +0000)
committerMarc Englund <marc.englund@itmill.com>
Tue, 3 Jun 2008 13:48:31 +0000 (13:48 +0000)
svn changeset:4734/svn branch:trunk

WebContent/ITMILL/themes/default/tabsheet/img/next.png
WebContent/ITMILL/themes/default/tabsheet/img/prev.png
WebContent/ITMILL/themes/default/tabsheet/tabsheet.css
src/com/itmill/toolkit/terminal/gwt/client/ui/ITabsheet.java

index 99418be185cea73d4bd38d34188d6683841ded31..0d07f3ffa907a2ec29f55d804570632c1afa970f 100644 (file)
Binary files a/WebContent/ITMILL/themes/default/tabsheet/img/next.png and b/WebContent/ITMILL/themes/default/tabsheet/img/next.png differ
index 2916761d657cf71437e85b088f2b22cb2349cb5c..783acf54c857dc56ce032d4d4d1c186b07448f58 100644 (file)
Binary files a/WebContent/ITMILL/themes/default/tabsheet/img/prev.png and b/WebContent/ITMILL/themes/default/tabsheet/img/prev.png differ
index 7f7e96c22f8e2e211993dc13d17018b30ebb0ea2..faf79fe0fe0ae629a653512ffb1a90cdcd67fa6c 100644 (file)
@@ -18,7 +18,6 @@
 .i-tabsheet-scroller {
        white-space: nowrap;
        text-align: right;
-       overflow: hidden;
        height: 48px;
 }
 .i-tabsheet-hidetabs .i-tabsheet-scroller {
 .i-tabsheet-scrollerNext {
        border: none;
        width: 12px;
-       height: 27px;
+       height: 38px;
        position: relative;
        margin-top: -10px;
-       top: -23px;
+       top: -29px;
 }
 .i-tabsheet-scrollerPrev-disabled,
 .i-tabsheet-scrollerNext-disabled {
        border: none;
        width: 12px;
-       height: 27px;
+       height: 38px;
        position: relative;
        margin-top: -10px;
-       top: -23px;
+       top: -29px;
 }
 
 .i-tabsheet-scrollerNext,
@@ -51,7 +50,7 @@
 .i-tabsheet-scrollerPrev,
 .i-tabsheet-scrollerPrev-disabled {
        background: transparent url(img/prev.png) no-repeat bottom left;
-       margin-right: 1px;
+       margin-right: 0px;
 }
 .i-tabsheet-scrollerPrev:hover,
 .i-tabsheet-scrollerNext:hover {
index 94fab77fe6ce91717061e0147ab1634876b1f52b..1a46196b99dba92dea7ace34c6b3dad95662c2b3 100644 (file)
@@ -193,6 +193,17 @@ public class ITabsheet extends ITabsheetBase implements
             tb.setVisible(true);
             removeStyleName(CLASSNAME + "-hidetabs");
         }
+
+        // tabs; push or not
+        if (uidl.hasAttribute("width")) {
+            // update width later, in updateTabScroller();
+            DOM.setStyleAttribute(scroller, "width", "1px");
+            DOM.setStyleAttribute(scroller, "overflow", "hidden");
+        } else {
+            DOM.setStyleAttribute(scroller, "width", "");
+            DOM.setStyleAttribute(scroller, "overflow", "visible");
+        }
+
         updateTabScroller();
         waitingForResponse = false;
     }
@@ -306,7 +317,8 @@ public class ITabsheet extends ITabsheetBase implements
      * Layouts the tab-scroller elements, and applies styles.
      */
     private void updateTabScroller() {
-        DOM.setStyleAttribute(scroller, "width", tp.getOffsetWidth() + "px");
+
+        DOM.setStyleAttribute(scroller, "width", getOffsetWidth() + "px");
 
         if (scrollerIndex > tb.getTabCount()) {
             scrollerIndex = 0;