             return
         }
 
-        let w = calcTabWidth(tabs.count)
-        updateTabWidthConstraint(width: w)
-        updateContentSize(tabs.count)
-        overflowIndicators()
-    }
-
-    func addTab(browser browser: Browser) -> TabWidget {
-        let t = TabWidget(browser: browser, parentScrollView: scrollView)
-        t.delegate = self
-
-        scrollView.addSubview(t)
-        t.alpha = 0
-
-        let w = calcTabWidth(tabs.count + 1)
-
-        UIView.animateWithDuration(0.2, animations: {
-            self.updateTabWidthConstraint(width: w)
-            self.scrollView.layoutIfNeeded()
-            }, completion: { _ in
-                UIView.animateWithDuration(0.2) {
-                    t.alpha = 1
-                }
-            }
-        )
-
-        t.remakeLayout(prev: tabs.last?.spacerRight != nil ? tabs.last!.spacerRight : spacerLeftmost, width: w, scrollView: scrollView)
-
-        tabs.append(t)
-        updateContentSize(tabs.count)
-        overflowIndicators()
-
-        return t
-    }
-
+        recalculateTabView()
+    }
+    
     func calcTabWidth(tabCount: Int) -> CGFloat {
         func calc() -> CGFloat {
             if tabCount < 2 {

        let c = calc()
        return c > 0 ? c : UIScreen.mainScreen().bounds.width
    }

    func neighborSpacer(i: Int) -> UIView? {
        if i < 0 {

    var leftOverflowIndicator : CAGradientLayer = CAGradientLayer()
    var rightOverflowIndicator : CAGradientLayer = CAGradientLayer()

    var isVisible:Bool {
        return self.view.alpha > 0
    }
    
    init() {
        super.init(nibName: nil, bundle: nil)

