From 9221be7c0536832578826d780549b56ff4846be4 Mon Sep 17 00:00:00 2001 From: piro Date: Tue, 7 Jul 2009 15:56:38 +0000 Subject: [PATCH] =?UTF-8?q?Tab=20Mix=20Plus=E3=81=A7=E8=A4=87=E6=95=B0?= =?UTF-8?q?=E8=A1=8C=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=9F=E3=82=BF?= =?UTF-8?q?=E3=83=96=E3=83=90=E3=83=BC=E3=81=AB=E3=81=A4=E3=81=84=E3=81=A6?= =?UTF-8?q?=E3=81=AF=E3=80=81=E9=AB=98=E3=81=95=E3=82=92=E5=8F=96=E3=82=8A?= =?UTF-8?q?=E9=99=A4=E3=81=8B=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4661 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 74 ++++++++++----------- 1 file changed, 35 insertions(+), 39 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 636bd129..3f3d9d7c 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -800,11 +800,10 @@ TreeStyleTabBrowser.prototype = { b.removeAttribute(this.kRESIZING); b.mStrip.removeAttribute('width'); - b.mStrip.removeAttribute('height'); b.mPanelContainer.removeAttribute('width'); - b.mPanelContainer.removeAttribute('height'); if (pos & this.kTABBAR_VERTICAL) { + this.collapseProp = 'margin-top'; this.positionProp = 'screenY'; this.sizeProp = 'height'; @@ -839,14 +838,14 @@ TreeStyleTabBrowser.prototype = { if (toolboxContainer) toolboxContainer.orient = 'vertical'; - b.mStrip.setAttribute('width', this.getTreePref('tabbar.width')); - - if (this.getTreePref('tabbar.fixed.vertical')) - b.setAttribute(this.kFIXED, true); - else - b.removeAttribute(this.kFIXED); - b.setAttribute(this.kMODE, 'vertical'); + + b.mStrip.setAttribute('width', this.getTreePref('tabbar.width')); + b.mStrip.removeAttribute('height'); + b.mPanelContainer.removeAttribute('height'); + + this.updateTabbarFixedState(); + if (pos == this.kTABBAR_RIGHT) { b.setAttribute(this.kTABBAR_POSITION, 'right'); if (this.getTreePref('tabbar.invertTab')) { @@ -917,19 +916,11 @@ TreeStyleTabBrowser.prototype = { if (toolboxContainer) toolboxContainer.orient = 'horizontal'; - - if (this.getTreePref('tabbar.fixed.horizontal')) { - b.setAttribute(this.kFIXED, true); - b.mStrip.removeAttribute('height'); - b.mPanelContainer.removeAttribute('height'); - } - else { - b.removeAttribute(this.kFIXED); - b.mStrip.setAttribute('height', this.getTreePref('tabbar.height')); - } - b.setAttribute(this.kMODE, this.getTreePref('tabbar.multirow') ? 'multirow' : 'horizontal' ); b.removeAttribute(this.kTAB_INVERTED); + + this.updateTabbarFixedState(); + if (pos == this.kTABBAR_BOTTOM) { b.setAttribute(this.kTABBAR_POSITION, 'bottom'); this.indentProp = this.getTreePref('indent.property.bottom'); @@ -970,6 +961,29 @@ TreeStyleTabBrowser.prototype = { scrollInnerBox = null; allTabsButton = null; }, + updateTabbarFixedState : function() + { + var b = this.mTabBrowser; + if (this.isVertical) { + if (this.getTreePref('tabbar.fixed.vertical')) + b.setAttribute(this.kFIXED, true); + else + b.removeAttribute(this.kFIXED); + } + else { + if (this.getTreePref('tabbar.fixed.horizontal')) { + b.setAttribute(this.kFIXED, true); + if (!this.isMultiRow) { + b.mStrip.removeAttribute('height'); + b.mPanelContainer.removeAttribute('height'); + } + } + else { + b.removeAttribute(this.kFIXED); + b.mStrip.setAttribute('height', this.getTreePref('tabbar.height')); + } + } + }, destroy : function() { @@ -1196,26 +1210,8 @@ TreeStyleTabBrowser.prototype = { break; case 'extensions.treestyletab.tabbar.fixed.vertical': - if (this.isVertical) { - if (value) - b.setAttribute(this.kFIXED, true); - else - b.removeAttribute(this.kFIXED); - } - break; - case 'extensions.treestyletab.tabbar.fixed.horizontal': - if (!this.isVertical) { - if (value) { - b.setAttribute(this.kFIXED, true); - b.mStrip.removeAttribute('height'); - b.mPanelContainer.removeAttribute('height'); - } - else { - b.removeAttribute(this.kFIXED); - b.mStrip.setAttribute('height', this.getTreePref('tabbar.height')); - } - } + this.updateTabbarFixedState(); break; case 'extensions.treestyletab.tabbar.transparent.style':