上または下に置かれたタブのインデント幅を一定の範囲に収めるようにした

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4419 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-05-12 19:09:13 +00:00
parent 52958b7959
commit 21048ec42a

View File

@ -2963,10 +2963,17 @@ TreeStyleTabBrowser.prototype = {
var oldIndent = this.indent;
var indent = (oldIndent < 0 ? this.baseIndent : oldIndent ) * nest;
var maxIndent = (
this.getFirstTab(b).boxObject[this.invertedSizeProp] ||
b.mTabContainer.boxObject[this.invertedSizeProp]
) * 0.33;
var maxIndentBase = (
this.getFirstTab(b).boxObject[this.invertedSizeProp] ||
b.mTabContainer.boxObject[this.invertedSizeProp]
);
if (!this.isVertical) {
if (this._horizontalTabMaxIndentBase)
maxIndentBase = this._horizontalTabMaxIndentBase;
else
this._horizontalTabMaxIndentBase = maxIndentBase;
}
var maxIndent = maxIndentBase * (this.isVertical ? 0.33 : 0.5 );
var indentUnit = Math.max(Math.floor(maxIndent / nest), 1);
if (indent > maxIndent) {
@ -2982,6 +2989,7 @@ TreeStyleTabBrowser.prototype = {
this.updateAllTabsIndent();
}
},
_horizontalTabMaxIndentBase : 0,
updateTabsCount : function(aTab, aDontUpdateAncestor)
{